StrDeinit
- Function
- October 8, 2025
Table of Contents
StrDeinit
StrDeinitDescription
Deinit str by freeing all allocations. str : Pointer to string to be deinited
Usage example (Cross-references)
- In
JSON.c:45:
if (read_si.pos == si.pos) {
LOG_ERROR("Failed to read string key in object. Invalid JSON");
StrDeinit(&key);
return saved_si;
}
- In
JSON.c:53:
if (StrIterPeek(&si) != ':') {
LOG_ERROR("Expected ':' after key string. Failed to read JSON");
StrDeinit(&key);
return saved_si;
}
- In
JSON.c:65:
if (read_si.pos == si.pos) {
LOG_ERROR("Failed to parse value. Invalid JSON.");
StrDeinit(&key);
return saved_si;
}
- In
JSON.c:71:
LOG_INFO("User skipped reading of '{}' field in JSON object.", key);
StrDeinit(&key);
si = read_si;
si = JSkipWhitespace(si);
- In
JSON.c:305:
if (has_exp) {
LOG_ERROR("Invalid number. Multiple exponent indicators.");
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:317:
if (is_flt) {
LOG_ERROR("Invalid number. Multiple decimal indicators.");
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:347:
"must appear after exponent 'E' or 'e' indicator."
);
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:355:
"Expected only once after 'e' or 'E'."
);
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:371:
if (!ns.length) {
LOG_ERROR("Failed to parse number. '{.8}'", LVAL(saved_si.data + saved_si.pos));
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:384:
if (end == ns.data) {
LOG_ERROR("Failed to convert string to number.");
StrDeinit(&ns);
return saved_si;
}
- In
JSON.c:398:
num->is_float = is_flt;
StrDeinit(&ns);
return si;
}
- In
JSON.c:592:
Str s = StrInit();
si = JReadString(si, &s);
StrDeinit(&s);
if (si.pos == before_si.pos) {
- In
Io.c:702:
}
StrDeinit(&buffer);
}
- In
Io.c:865:
StrPushBackZstr(o, "0x");
StrMerge(o, &hex);
StrDeinit(&hex);
}
} else {
- In
Io.c:935:
StrPushBackZstr(o, "0x");
StrMerge(o, &hex);
StrDeinit(&hex);
i++;
}
- In
Io.c:1012:
// Merge the formatted number into output
StrMerge(o, &temp);
StrDeinit(&temp);
// Apply padding if width is specified
- In
Io.c:1104:
// Merge the formatted number into output
StrMerge(o, &temp);
StrDeinit(&temp);
// Apply padding if width is specified
- In
Io.c:1214:
// Merge the formatted number into output
StrMerge(o, &temp);
StrDeinit(&temp);
}
- In
Io.c:1343:
char c = ProcessEscape(&curr);
if (c == 0) { // Error in escape sequence
StrDeinit(s);
return NULL;
}
- In
Io.c:1380:
char c = ProcessEscape(&curr);
if (c == 0) { // Error in escape sequence
StrDeinit(s);
return NULL;
}
- In
Io.c:1409:
if (quote) {
LOG_ERROR("Unterminated quoted string");
StrDeinit(s);
return NULL;
}
- In
Io.c:1611:
// Try to parse as special value
if (StrToF64(&temp, v, NULL)) {
StrDeinit(&temp);
return i;
}
- In
Io.c:1614:
return i;
}
StrDeinit(&temp);
// If parsing failed, fall back to the new approach
- In
Io.c:1670:
if (!IsValidNumericString(&temp, true)) {
LOG_ERROR("Invalid floating point format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1677:
if (!StrToF64(&temp, v, NULL)) {
LOG_ERROR("Failed to parse f64");
StrDeinit(&temp);
return start;
}
- In
Io.c:1681:
}
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:1727:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1734:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1742:
if (!StrToU64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse u8");
StrDeinit(&temp);
return start;
}
- In
Io.c:1749:
if (val > UINT8_MAX) {
LOG_ERROR("Value {} exceeds u8 maximum ({})", val, UINT8_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:1754:
*v = (u8)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:1802:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1809:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1817:
if (!StrToU64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse u16");
StrDeinit(&temp);
return start;
}
- In
Io.c:1824:
if (val > UINT16_MAX) {
LOG_ERROR("Value {} exceeds u16 maximum ({})", val, UINT16_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:1829:
*v = (u16)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:1876:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1883:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1891:
if (!StrToU64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse u32");
StrDeinit(&temp);
return start;
}
- In
Io.c:1898:
if (val > UINT32_MAX) {
LOG_ERROR("Value {} exceeds u32 maximum ({})", val, UINT32_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:1903:
*v = (u32)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:1951:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1958:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:1965:
if (!StrToU64(&temp, v, NULL)) {
LOG_ERROR("Failed to parse u64");
StrDeinit(&temp);
return start;
}
- In
Io.c:1969:
}
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:2016:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2023:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2031:
if (!StrToI64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse i8");
StrDeinit(&temp);
return start;
}
- In
Io.c:2038:
if (val > INT8_MAX || val < INT8_MIN) {
LOG_ERROR("Value {} outside i8 range ({} to {})", val, INT8_MIN, INT8_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:2043:
*v = (i8)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:2091:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2098:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2106:
if (!StrToI64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse i16");
StrDeinit(&temp);
return start;
}
- In
Io.c:2113:
if (val > INT16_MAX || val < INT16_MIN) {
LOG_ERROR("Value {} outside i16 range ({} to {})", val, INT16_MIN, INT16_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:2118:
*v = (i16)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:2166:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2173:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2181:
if (!StrToI64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse i32");
StrDeinit(&temp);
return start;
}
- In
Io.c:2188:
if (val > INT32_MAX || val < INT32_MIN) {
LOG_ERROR("Value {} outside i32 range ({} to {})", val, INT32_MIN, INT32_MAX);
StrDeinit(&temp);
return start;
}
- In
Io.c:2193:
*v = (i32)val;
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:2241:
temp.data[1] == 'o' || temp.data[1] == 'O')) {
LOG_ERROR("Incomplete number format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2248:
if (!IsValidNumericString(&temp, false)) {
LOG_ERROR("Invalid numeric format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2255:
if (!StrToI64(&temp, v, NULL)) {
LOG_ERROR("Failed to parse i64");
StrDeinit(&temp);
return start;
}
- In
Io.c:2259:
}
StrDeinit(&temp);
return start + pos;
}
- In
Io.c:2275:
// Check if reading failed
if (next == i) {
StrDeinit(&temp);
return i;
}
- In
Io.c:2283:
if (!result) {
LOG_ERROR("Failed to allocate memory for string");
StrDeinit(&temp);
return i;
}
- In
Io.c:2291:
*out = result;
StrDeinit(&temp);
return next;
}
- In
Io.c:2333:
Str bit_str = BitVecToStr(bv);
StrMerge(o, &bit_str);
StrDeinit(&bit_str);
}
}
- In
Io.c:2394:
if (!StrToU64(&hex_str, &value, &config)) {
LOG_ERROR("Failed to parse hex value");
StrDeinit(&hex_str);
return start;
}
- In
Io.c:2404:
*bv = BitVecFromInteger(value, bit_len);
StrDeinit(&hex_str);
return i;
}
- In
Io.c:2430:
if (!StrToU64(&oct_str, &value, &config)) {
LOG_ERROR("Failed to parse octal value");
StrDeinit(&oct_str);
return start;
}
- In
Io.c:2440:
*bv = BitVecFromInteger(value, bit_len);
StrDeinit(&oct_str);
return i;
}
- In
Io.c:2463:
*bv = BitVecFromStr(bin_str.data);
StrDeinit(&bin_str);
return i;
}
- In
Io.c:2510:
if (StrToF64(&temp, &val, NULL)) {
*v = (f32)val;
StrDeinit(&temp);
return i;
}
- In
Io.c:2513:
return i;
}
StrDeinit(&temp);
// If parsing failed, fall back to the new approach
- In
Io.c:2569:
if (!IsValidNumericString(&temp, true)) {
LOG_ERROR("Invalid floating point format");
StrDeinit(&temp);
return start;
}
- In
Io.c:2577:
if (!StrToF64(&temp, &val, NULL)) {
LOG_ERROR("Failed to parse f32");
StrDeinit(&temp);
return start;
}
- In
Io.c:2582:
*v = (f32)val;
StrDeinit(&temp);
return start + pos;
}
- In
Log.c:72:
// Free resources
StrDeinit(&file_name);
StrDeinit(&log_dir);
- In
Log.c:73:
// Free resources
StrDeinit(&file_name);
StrDeinit(&log_dir);
if (e || !stderror) {
- In
Str.c:85:
}
void StrDeinit(Str *copy) {
ValidateStr(copy);
if (copy->data) {
- In
Str.c:121:
ValidateStr(s);
Strs sv = VecInitWithDeepCopy(NULL, StrDeinit);
size keylen = ZstrLen(key);
- In
BitVec.c:1604:
}
StrDeinit(&bv_str);
return result;
}
- In
Dir.c:65:
}
StrDeinit(©->name);
copy->type = 0;
- In
Dir.c:157:
stat(entry_path.data, &path_stat);
StrDeinit(&entry_path);
SysDirEntry direntry = {0};
- In
Proc.c:202:
LOG_SYS_ERROR("CreateProcessA() failed");
StrDeinit(&cmdline);
CloseHandle(hStdinRead);
CloseHandle(hStdinWrite);
- In
Proc.c:212:
return NULL;
}
StrDeinit(&cmdline);
CloseHandle(hStdinRead); // parent won't read from child's stdin, will write to it
- In
Str.Convert.c:86:
}
StrDeinit(&s);
return result;
}
}
StrDeinit(&s);
return result;
}
result = result && (ZstrCompare(s.data, "nan") == 0);
StrDeinit(&s);
return result;
}
// Test hexadecimal conversion with explicit base
StrDeinit(&s);
s = StrInitFromZstr("ABCD"); // No 0x prefix when base is explicitly 16
StrParseConfig config = {.base = 16};
// Test hexadecimal conversion (auto-detect base with 0)
StrDeinit(&s);
s = StrInitFromZstr("0xABCD");
success = StrToU64(&s, &value, NULL);
// Test binary conversion
StrDeinit(&s);
s = StrInitFromZstr("0b101010");
success = StrToU64(&s, &value, NULL);
// Test octal conversion
StrDeinit(&s);
s = StrInitFromZstr("0o52");
success = StrToU64(&s, &value, NULL);
// Test zero
StrDeinit(&s);
s = StrInitFromZstr("0");
success = StrToU64(&s, &value, NULL);
// Test invalid input
StrDeinit(&s);
s = StrInitFromZstr("not a number");
success = StrToU64(&s, &value, NULL);
// Test negative number (should fail for unsigned)
StrDeinit(&s);
s = StrInitFromZstr("-123");
success = StrToU64(&s, &value, NULL);
result = result && (!success);
StrDeinit(&s);
return result;
}
// Test negative decimal conversion
StrDeinit(&s);
s = StrInitFromZstr("-12345");
success = StrToI64(&s, &value, NULL);
// Test hexadecimal conversion
StrDeinit(&s);
s = StrInitFromZstr("0xABCD");
success = StrToI64(&s, &value, NULL);
// Test binary conversion
StrDeinit(&s);
s = StrInitFromZstr("0b101010");
success = StrToI64(&s, &value, NULL);
// Test zero
StrDeinit(&s);
s = StrInitFromZstr("0");
success = StrToI64(&s, &value, NULL);
// Test invalid input
StrDeinit(&s);
s = StrInitFromZstr("not a number");
success = StrToI64(&s, &value, NULL);
result = result && (!success);
StrDeinit(&s);
return result;
}
// Test fractional conversion
StrDeinit(&s);
s = StrInitFromZstr("123.456");
success = StrToF64(&s, &value, NULL);
// Test negative number
StrDeinit(&s);
s = StrInitFromZstr("-123.456");
success = StrToF64(&s, &value, NULL);
// Test scientific notation
StrDeinit(&s);
s = StrInitFromZstr("1.23e2");
success = StrToF64(&s, &value, NULL);
// Test zero
StrDeinit(&s);
s = StrInitFromZstr("0");
success = StrToF64(&s, &value, NULL);
// Test infinity
StrDeinit(&s);
s = StrInitFromZstr("inf");
success = StrToF64(&s, &value, NULL);
// Test negative infinity
StrDeinit(&s);
s = StrInitFromZstr("-inf");
success = StrToF64(&s, &value, NULL);
// Test NaN
StrDeinit(&s);
s = StrInitFromZstr("nan");
success = StrToF64(&s, &value, NULL);
// Test invalid input
StrDeinit(&s);
s = StrInitFromZstr("not a number");
success = StrToF64(&s, &value, NULL);
result = result && (!success);
StrDeinit(&s);
return result;
}
result = result && success && (recovered_u64 == u64_values[i]);
StrDeinit(&s);
}
result = result && success && (recovered_i64 == i64_values[i]);
StrDeinit(&s);
}
result = result && success && (fabs(recovered_f64 - f64_values[i]) < tolerance);
StrDeinit(&s);
}
}
result = result && success && (recovered == base);
StrDeinit(&s);
}
result = result && success && (recovered_large > 1e299);
StrDeinit(&s);
// Test prefix handling
bool success = StrToU64(&test_str, &value, prefix_tests[i].base == 0 ? NULL : &config);
result = result && success && (value == prefix_tests[i].expected);
StrDeinit(&test_str);
}
}
StrDeinit(&s);
}
result = result && has_E;
StrDeinit(&s);
}
result = result && success && (recovered == large_value);
StrDeinit(&s);
}
result = result && success && (recovered == test_value);
StrDeinit(&s);
}
result = result && success && (recovered == test_value);
StrDeinit(&s);
}
result = result && success && (recovered == test_values[i]);
StrDeinit(&s);
if (!result)
result = result && success && (recovered == test_value);
StrDeinit(&s);
if (!result)
result = result && success && (fabs(recovered - test_value) < tolerance);
StrDeinit(&s);
if (!result)
result = result && (success || !success); // Either succeeds or fails gracefully
StrDeinit(&long_str);
return result;
- In
Io.Read.c:346:
Str expected = StrInitFromZstr("Hello");
success = success && (StrCmp(&s, &expected) == 0);
StrDeinit(&expected);
StrClear(&s);
- In
Io.Read.c:355:
expected = StrInitFromZstr("Hello, World!");
success = success && (StrCmp(&s, &expected) == 0);
StrDeinit(&expected);
StrDeinit(&s);
- In
Io.Read.c:357:
StrDeinit(&expected);
StrDeinit(&s);
return success;
- In
Io.Read.c:379:
Str expected = StrInitFromZstr("Alice");
success = success && (StrCmp(&name, &expected) == 0);
StrDeinit(&expected);
StrClear(&name);
- In
Io.Read.c:391:
expected = StrInitFromZstr("Bob");
success = success && (StrCmp(&name, &expected) == 0);
StrDeinit(&expected);
StrDeinit(&name);
- In
Io.Read.c:393:
StrDeinit(&expected);
StrDeinit(&name);
return success;
- In
Io.Read.c:593:
WriteFmt("str_val test: comparing with 'Hello', pass = {}\n", str_pass ? "true" : "false");
success = success && str_pass;
StrDeinit(&expected);
StrDeinit(&str_val);
- In
Io.Read.c:594:
success = success && str_pass;
StrDeinit(&expected);
StrDeinit(&str_val);
str_val = StrInit();
- In
Io.Read.c:603:
WriteFmt("quoted str_val test: comparing with 'World', pass = {}\n", quoted_str_pass ? "true" : "false");
success = success && quoted_str_pass;
StrDeinit(&expected);
StrDeinit(&str_val);
- In
Io.Read.c:604:
success = success && quoted_str_pass;
StrDeinit(&expected);
StrDeinit(&str_val);
WriteFmt("Overall success: {}\n", success ? "true" : "false");
- In
Io.Read.c:639:
success = success && test1_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:640:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:664:
success = success && test1_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:665:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:689:
success = success && test2_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:690:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:710:
success = success && test2_pass;
StrDeinit(&result1);
StrDeinit(&result2);
}
- In
Io.Read.c:711:
StrDeinit(&result1);
StrDeinit(&result2);
}
- In
Io.Read.c:733:
success = success && test2_pass;
StrDeinit(&result1);
StrDeinit(&result2);
}
- In
Io.Read.c:734:
StrDeinit(&result1);
StrDeinit(&result2);
}
- In
Io.Read.c:758:
success = success && test3_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:759:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:783:
success = success && test4_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:784:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:808:
success = success && test5_pass;
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:809:
StrDeinit(&expected);
StrDeinit(&result);
}
- In
Io.Read.c:835:
(ZstrCompare(result1.data, "10110") == 0) ? "true" : "false"
);
StrDeinit(&result1);
BitVecDeinit(&bv1);
- In
Io.Read.c:867:
(ZstrCompare(result4.data, "1101") == 0) ? "true" : "false"
);
StrDeinit(&result4);
BitVecDeinit(&bv4);
- In
Io.Read.c:877:
success = success && (ZstrCompare(result5.data, "0") == 0);
WriteFmt("Test 5 - Zero: {}, Success: {}\n", result5, (ZstrCompare(result5.data, "0") == 0) ? "true" : "false");
StrDeinit(&result5);
BitVecDeinit(&bv5);
- In
Str.Type.c:36:
bool result = (s.length == 5 && ZstrCompare(s.data, "Hello") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Type.c:45:
// Create a Strs object (vector of strings)
Strs sv = VecInitWithDeepCopy(NULL, StrDeinit);
// Add some strings
- In
Str.Type.c:66:
}
VecDeinit(&sv); // This should call StrDeinit on each element
return result;
}
- In
Str.Type.c:86:
bool result = true; // If we got here, the validation didn't crash
StrDeinit(&s);
return result;
}
- In
Io.Write.c:55:
success = success && (ZstrCompare(output.data, "{{") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:95:
StrWriteFmt(&output, "{}", s);
success = success && (ZstrCompare(output.data, "World") == 0);
StrDeinit(&s);
StrDeinit(&output);
- In
Io.Write.c:97:
StrDeinit(&s);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:170:
success = success && (ZstrCompare(output.data, "0") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:189:
success = success && (ZstrCompare(output.data, "0xDEADBEEF") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:204:
success = success && (ZstrCompare(output.data, "0b10100101") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:219:
success = success && (ZstrCompare(output.data, "0o777") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:239:
success = success && (ZstrCompare(output.data, "2.718280") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:264:
success = success && (ZstrCompare(output.data, "3.1415926536") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:291:
success = success && (ZstrCompare(output.data, "nan") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:329:
success = success && (ZstrCompare(output.data, " abc ") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:352:
success = success && (ZstrCompare(output.data, "3.140000 Hello 42") == 0);
StrDeinit(&output);
return success;
}
- In
Io.Write.c:543:
output.data[5] == 'Z' && output.data[6] == '1' && output.data[7] == '2');
StrDeinit(&output);
StrDeinit(&s);
return success;
- In
Io.Write.c:544:
StrDeinit(&output);
StrDeinit(&s);
return success;
}
- In
Io.Write.c:613:
BitVecDeinit(&bv3);
BitVecDeinit(&bv_zero);
StrDeinit(&output);
return success;
}
- In
Str.Access.c:30:
bool result = (first == 'H');
StrDeinit(&s);
return result;
}
- In
Str.Access.c:46:
bool result = (last == 'o');
StrDeinit(&s);
return result;
}
- In
Str.Access.c:62:
bool result = (begin == s.data && *begin == 'H');
StrDeinit(&s);
return result;
}
- In
Str.Access.c:78:
bool result = (end == s.data + s.length && *end == '\0');
StrDeinit(&s);
return result;
}
- In
Str.Access.c:99:
bool result = (c0 == 'H' && c1 == 'e' && c2 == 'l' && c3 == 'l' && c4 == 'o');
StrDeinit(&s);
return result;
}
- In
Str.Access.c:123:
result = result && (p0 == s.data && p1 == s.data + 1 && p2 == s.data + 2 && p3 == s.data + 3 && p4 == s.data + 4);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:39:
result = result && (ZstrCompare(s.data, "Hel") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:63:
result = result && (ZstrCompare(s.data, "llo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:87:
result = result && (ZstrCompare(s.data, "Hlo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:114:
result = result && (ZstrCompare(s.data, "Hell") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:136:
result = result && (ZstrCompare(s.data, "Hel") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:158:
result = result && (ZstrCompare(s.data, "Hlo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Remove.c:180:
result = result && (ZstrCompare(s.data, "Heo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Foreach.c:47:
bool success = (ZstrCompare(result.data, "H0e1l2l3o4") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
- In
Str.Foreach.c:48:
StrDeinit(&s);
StrDeinit(&result);
return success;
}
- In
Str.Foreach.c:69:
WriteFmt(" (Index 0 was processed)\n");
StrDeinit(&s);
StrDeinit(&result);
return success;
- In
Str.Foreach.c:70:
StrDeinit(&s);
StrDeinit(&result);
return success;
}
- In
Str.Foreach.c:98:
success = success && (ZstrCompare(s.data, "HELLO") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
- In
Str.Foreach.c:99:
StrDeinit(&s);
StrDeinit(&result);
return success;
}
WriteFmt(" (Index 0 was processed)\n");
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
bool success = (ZstrCompare(result.data, "Hello") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
}
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
success = success && (ZstrCompare(s.data, "HELLO") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
}
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
success = success && (empty_result.length == 0);
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&empty_result);
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&empty_result);
return success;
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&empty_result);
return success;
}
success = success && (ZstrCompare(end_result.data, "World") == 0);
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&end_result);
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&end_result);
return success;
StrDeinit(&s);
StrDeinit(&result);
StrDeinit(&end_result);
return success;
}
success = success && (ZstrCompare(s.data, "Hello WORLD") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
success = success && (ZstrCompare(s.data, "HELLO World") == 0);
StrDeinit(&s);
StrDeinit(&result);
return success;
StrDeinit(&s);
StrDeinit(&result);
return success;
}
if (idx > 4) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx >= 5) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx < 10) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx > 4) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx < 12) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx >= s.length) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
if (idx > 3) {
LOG_ERROR("Should've terminated");
StrDeinit(&s);
return false;
}
}
StrDeinit(&s);
return true;
}
- In
Str.Init.c:34:
bool result = (s.length == 0);
StrDeinit(&s);
return result;
}
- In
Str.Init.c:52:
bool result = (s.length == len && ZstrCompareN(s.data, test_str, len) == 0 && s.data[len] == '\0');
StrDeinit(&s);
return result;
}
- In
Str.Init.c:69:
bool result = (s.length == strlen(test_str) && ZstrCompare(s.data, test_str) == 0);
StrDeinit(&s);
return result;
}
- In
Str.Init.c:87:
bool result = (dst.length == src.length && ZstrCompare(dst.data, src.data) == 0);
StrDeinit(&src);
StrDeinit(&dst);
return result;
- In
Str.Init.c:88:
StrDeinit(&src);
StrDeinit(&dst);
return result;
}
- In
Str.Init.c:106:
bool result = (dst.length == src.length && ZstrCompare(dst.data, src.data) == 0);
StrDeinit(&src);
StrDeinit(&dst);
return result;
- In
Str.Init.c:107:
StrDeinit(&src);
StrDeinit(&dst);
return result;
}
- In
Str.Init.c:124:
bool result = (ZstrCompare(s.data, "Hello, World!") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Init.c:179:
bool result = (success && dst.length == src.length && ZstrCompare(dst.data, src.data) == 0);
StrDeinit(&src);
StrDeinit(&dst);
return result;
- In
Str.Init.c:180:
StrDeinit(&src);
StrDeinit(&dst);
return result;
}
- In
Str.Init.c:186:
// Test StrDeinit function
bool test_str_deinit(void) {
WriteFmt("Testing StrDeinit\n");
Str s = StrInitFromZstr("Hello, World!");
- In
Str.Init.c:194:
// Deinit the string
StrDeinit(&s);
// Check that the string is deinited correctly
- In
Str.Ops.c:47:
result = result && (cmp5 != 0);
StrDeinit(&s1);
StrDeinit(&s2);
StrDeinit(&s3);
- In
Str.Ops.c:48:
StrDeinit(&s1);
StrDeinit(&s2);
StrDeinit(&s3);
StrDeinit(&s4);
- In
Str.Ops.c:49:
StrDeinit(&s1);
StrDeinit(&s2);
StrDeinit(&s3);
StrDeinit(&s4);
return result;
- In
Str.Ops.c:50:
StrDeinit(&s2);
StrDeinit(&s3);
StrDeinit(&s4);
return result;
}
- In
Str.Ops.c:83:
result = result && (found5 != NULL && ZstrCompareN(found5, "World", 3) == 0);
StrDeinit(&haystack);
StrDeinit(&needle1);
StrDeinit(&needle2);
- In
Str.Ops.c:84:
StrDeinit(&haystack);
StrDeinit(&needle1);
StrDeinit(&needle2);
StrDeinit(&needle3);
- In
Str.Ops.c:85:
StrDeinit(&haystack);
StrDeinit(&needle1);
StrDeinit(&needle2);
StrDeinit(&needle3);
return result;
- In
Str.Ops.c:86:
StrDeinit(&needle1);
StrDeinit(&needle2);
StrDeinit(&needle3);
return result;
}
- In
Str.Ops.c:120:
result = result && !StrEndsWithCstr(&s, "ello", 4);
StrDeinit(&s);
StrDeinit(&prefix);
StrDeinit(&suffix);
- In
Str.Ops.c:121:
StrDeinit(&s);
StrDeinit(&prefix);
StrDeinit(&suffix);
return result;
- In
Str.Ops.c:122:
StrDeinit(&s);
StrDeinit(&prefix);
StrDeinit(&suffix);
return result;
}
- In
Str.Ops.c:136:
// Test multiple replacements
StrDeinit(&s1);
s1 = StrInitFromZstr("Hello Hello Hello");
StrReplaceZstr(&s1, "Hello", "Hi", 2);
- In
Str.Ops.c:142:
// Test StrReplaceCstr - use the full "World" string instead of just "Wo"
StrDeinit(&s1);
s1 = StrInitFromZstr("Hello World");
StrReplaceCstr(&s1, "World", 5, "Universe", 8, 1);
- In
Str.Ops.c:148:
// Test StrReplace
StrDeinit(&s1);
s1 = StrInitFromZstr("Hello World");
Str find = StrInitFromZstr("World");
- In
Str.Ops.c:155:
result = result && (ZstrCompare(s1.data, "Hello Universe") == 0);
StrDeinit(&s1);
StrDeinit(&find);
StrDeinit(&replace);
- In
Str.Ops.c:156:
StrDeinit(&s1);
StrDeinit(&find);
StrDeinit(&replace);
return result;
- In
Str.Ops.c:157:
StrDeinit(&s1);
StrDeinit(&find);
StrDeinit(&replace);
return result;
}
- In
Str.Ops.c:203:
VecDeinit(&iters);
StrDeinit(&s);
return result;
}
- In
Str.Ops.c:215:
Str stripped = StrLStrip(&s1, NULL);
bool result = (ZstrCompare(stripped.data, "Hello ") == 0);
StrDeinit(&stripped);
// Test StrRStrip
- In
Str.Ops.c:220:
stripped = StrRStrip(&s1, NULL);
result = result && (ZstrCompare(stripped.data, " Hello") == 0);
StrDeinit(&stripped);
// Test StrStrip
- In
Str.Ops.c:225:
stripped = StrStrip(&s1, NULL);
result = result && (ZstrCompare(stripped.data, "Hello") == 0);
StrDeinit(&stripped);
// Test with custom strip characters
- In
Str.Ops.c:228:
// Test with custom strip characters
StrDeinit(&s1);
s1 = StrInitFromZstr("***Hello***");
- In
Str.Ops.c:233:
stripped = StrLStrip(&s1, "*");
result = result && (ZstrCompare(stripped.data, "Hello***") == 0);
StrDeinit(&stripped);
stripped = StrRStrip(&s1, "*");
- In
Str.Ops.c:237:
stripped = StrRStrip(&s1, "*");
result = result && (ZstrCompare(stripped.data, "***Hello") == 0);
StrDeinit(&stripped);
stripped = StrStrip(&s1, "*");
- In
Str.Ops.c:241:
stripped = StrStrip(&s1, "*");
result = result && (ZstrCompare(stripped.data, "Hello") == 0);
StrDeinit(&stripped);
StrDeinit(&s1);
- In
Str.Ops.c:243:
StrDeinit(&stripped);
StrDeinit(&s1);
return result;
}
- In
Str.Insert.c:52:
result = result && (ZstrCompare(s.data, "?He!llo.") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:68:
bool result = (ZstrCompare(s.data, "He Worldllo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:84:
bool result = (ZstrCompare(s.data, "He Worldllo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:101:
bool result = (ZstrCompare(s1.data, "He Worldllo") == 0);
StrDeinit(&s1);
StrDeinit(&s2);
return result;
- In
Str.Insert.c:102:
StrDeinit(&s1);
StrDeinit(&s2);
return result;
}
- In
Str.Insert.c:118:
bool result = (ZstrCompare(s.data, "He Worldllo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:134:
bool result = (ZstrCompare(s.data, "He Worldllo") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:150:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:166:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:182:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:198:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:219:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:240:
bool result = (ZstrCompare(s.data, "Hello World") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Insert.c:264:
result = result && (s2.length == 0 && s2.data == NULL);
StrDeinit(&s1);
StrDeinit(&s2);
return result;
- In
Str.Insert.c:265:
StrDeinit(&s1);
StrDeinit(&s2);
return result;
}
- In
Str.Insert.c:285:
result = result && (s2.length == 6 && ZstrCompare(s2.data, " World") == 0);
StrDeinit(&s1);
StrDeinit(&s2);
return result;
- In
Str.Insert.c:286:
StrDeinit(&s1);
StrDeinit(&s2);
return result;
}
- In
Str.Insert.c:306:
result = result && (s2.length == 6 && ZstrCompare(s2.data, " World") == 0);
StrDeinit(&s1);
StrDeinit(&s2);
return result;
- In
Str.Insert.c:307:
StrDeinit(&s1);
StrDeinit(&s2);
return result;
}
- In
Str.Insert.c:323:
bool result = (ZstrCompare(s.data, "Hello World 2023") == 0);
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:38:
result = result && (s.capacity < 100) && (s.capacity >= s.length);
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:60:
result = result && (s.data[1] == 'l' && s.data[2] == 'e');
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:86:
result = result && (s.length == 8) && (ZstrCompareN(s.data, "Hel", 3) == 0);
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:111:
result = result && (s.capacity >= 100);
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:133:
result = result && (s.data != NULL);
StrDeinit(&s);
return result;
}
- In
Str.Memory.c:150:
// Test with an even-length string
StrDeinit(&s);
s = StrInitFromZstr("abcd");
- In
Str.Memory.c:160:
// Test with a single-character string
StrDeinit(&s);
s = StrInitFromZstr("a");
- In
Str.Memory.c:170:
// Test with an empty string
StrDeinit(&s);
s = StrInit();
- In
Str.Memory.c:179:
result = result && (s.length == 0);
StrDeinit(&s);
return result;
}
// Clean up
StrDeinit(&str);
BitVecDeinit(&bv);
Str str_obj = BitVecToStr(&bv);
result = result && (str_obj.length == 0);
StrDeinit(&str_obj);
// Test converting single bit
result = result && (str_obj.length == 1);
result = result && (StrCmpCstr(&str_obj, "1", 1) == 0);
StrDeinit(&str_obj);
// Test large conversions
str_obj = BitVecToStr(&bv);
result = result && (str_obj.length == 1000);
StrDeinit(&str_obj);
BitVecDeinit(&bv);
result = result && (ZstrCompare(str.data, patterns[i]) == 0);
StrDeinit(&str);
BitVecDeinit(&bv);
}
Str empty_str = BitVecToStr(&empty);
result = result && (empty_str.length == 0);
StrDeinit(&empty_str);
u64 empty_value = BitVecToInteger(&empty);
Str str = BitVecToStr(&bv);
result = result && (ZstrCompare(str.data, test_cases[i].pattern) == 0);
StrDeinit(&str);
// Test integer conversion (may depend on bit order)
result = result && cross_match;
StrDeinit(&str1);
StrDeinit(&str2);
StrDeinit(&str3);
StrDeinit(&str1);
StrDeinit(&str2);
StrDeinit(&str3);
BitVecDeinit(&bv1);
StrDeinit(&str1);
StrDeinit(&str2);
StrDeinit(&str3);
BitVecDeinit(&bv1);
BitVecDeinit(&bv2);
result = result && pattern_correct;
StrDeinit(&large_str);
// Test byte conversion
- In
RoundTrip.c:37:
// Cleanup functions
void TestPersonDeinit(TestPerson *person) {
StrDeinit(&person->name);
}
- In
RoundTrip.c:41:
void TestConfigDeinit(TestConfig *config) {
StrDeinit(&config->log_level);
VecDeinit(&config->features);
}
- In
RoundTrip.c:148:
}
StrDeinit(&json);
StrDeinit(&original.message);
StrDeinit(&parsed.message);
- In
RoundTrip.c:149:
StrDeinit(&json);
StrDeinit(&original.message);
StrDeinit(&parsed.message);
return success;
- In
RoundTrip.c:150:
StrDeinit(&json);
StrDeinit(&original.message);
StrDeinit(&parsed.message);
return success;
}
- In
RoundTrip.c:222:
}
StrDeinit(&json);
return success;
}
- In
RoundTrip.c:274:
}
StrDeinit(&json);
return success;
}
- In
RoundTrip.c:333:
// Cleanup
StrDeinit(&json);
StrDeinit(&original.empty);
StrDeinit(&original.simple);
- In
RoundTrip.c:334:
// Cleanup
StrDeinit(&json);
StrDeinit(&original.empty);
StrDeinit(&original.simple);
StrDeinit(&original.with_spaces);
- In
RoundTrip.c:335:
StrDeinit(&json);
StrDeinit(&original.empty);
StrDeinit(&original.simple);
StrDeinit(&original.with_spaces);
StrDeinit(&original.with_special);
- In
RoundTrip.c:336:
StrDeinit(&original.empty);
StrDeinit(&original.simple);
StrDeinit(&original.with_spaces);
StrDeinit(&original.with_special);
StrDeinit(&parsed.empty);
- In
RoundTrip.c:337:
StrDeinit(&original.simple);
StrDeinit(&original.with_spaces);
StrDeinit(&original.with_special);
StrDeinit(&parsed.empty);
StrDeinit(&parsed.simple);
- In
RoundTrip.c:338:
StrDeinit(&original.with_spaces);
StrDeinit(&original.with_special);
StrDeinit(&parsed.empty);
StrDeinit(&parsed.simple);
StrDeinit(&parsed.with_spaces);
- In
RoundTrip.c:339:
StrDeinit(&original.with_special);
StrDeinit(&parsed.empty);
StrDeinit(&parsed.simple);
StrDeinit(&parsed.with_spaces);
StrDeinit(&parsed.with_special);
- In
RoundTrip.c:340:
StrDeinit(&parsed.empty);
StrDeinit(&parsed.simple);
StrDeinit(&parsed.with_spaces);
StrDeinit(&parsed.with_special);
return success;
- In
RoundTrip.c:341:
StrDeinit(&parsed.simple);
StrDeinit(&parsed.with_spaces);
StrDeinit(&parsed.with_special);
return success;
}
- In
RoundTrip.c:353:
// Original data
Vec(i32) original_numbers = VecInit();
Vec(Str) original_strings = VecInitWithDeepCopy(NULL, StrDeinit);
// Populate arrays
- In
RoundTrip.c:381:
// Read back from JSON
Vec(i32) parsed_numbers = VecInit();
Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
StrIter si = StrIterFromStr(json);
- In
RoundTrip.c:440:
// Cleanup
StrDeinit(&json);
VecDeinit(&original_numbers);
VecDeinit(&original_strings);
- In
RoundTrip.c:492:
// Cleanup
StrDeinit(&json);
TestPersonDeinit(&original_person);
TestPersonDeinit(&parsed_person);
- In
RoundTrip.c:515:
original.config.timeout = 30;
original.config.log_level = StrInitFromZstr("INFO");
original.config.features = VecInitWithDeepCopyT(original.config.features, NULL, StrDeinit);
// Create strings and push them properly
- In
RoundTrip.c:564:
parsed.config.timeout = 0;
parsed.config.log_level = StrInit();
parsed.config.features = VecInitWithDeepCopyT(parsed.config.features, NULL, StrDeinit);
parsed.numbers = VecInitT(parsed.numbers);
parsed.flags = VecInitT(parsed.flags);
- In
RoundTrip.c:635:
// Cleanup
StrDeinit(&json);
ComplexDataDeinit(&original);
ComplexDataDeinit(&parsed);
- In
RoundTrip.c:649:
// Original empty data
Vec(i32) empty_numbers = VecInit();
Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
Str empty_str = StrInit();
- In
RoundTrip.c:669:
// Read back from JSON
Vec(i32) parsed_numbers = VecInit();
Vec(Str) parsed_strings = VecInitWithDeepCopy(NULL, StrDeinit);
Str parsed_str = StrInit();
bool found_empty_object = false;
- In
RoundTrip.c:706:
// Cleanup
StrDeinit(&json);
StrDeinit(&empty_str);
StrDeinit(&parsed_str);
- In
RoundTrip.c:707:
// Cleanup
StrDeinit(&json);
StrDeinit(&empty_str);
StrDeinit(&parsed_str);
VecDeinit(&empty_numbers);
- In
RoundTrip.c:708:
StrDeinit(&json);
StrDeinit(&empty_str);
StrDeinit(&parsed_str);
VecDeinit(&empty_numbers);
VecDeinit(&empty_strings);
- In
RoundTrip.c:773:
}
StrDeinit(&json);
return success;
}
- In
Read.Simple.c:35:
// Cleanup functions
void PersonDeinit(Person *person) {
StrDeinit(&person->name);
}
- In
Read.Simple.c:39:
void ConfigDeinit(Config *config) {
StrDeinit(&config->log_level);
}
- In
Read.Simple.c:43:
void SimpleProductDeinit(SimpleProduct *product) {
StrDeinit(&product->name);
VecDeinit(&product->tags);
}
- In
Read.Simple.c:91:
}
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
- In
Read.Simple.c:92:
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
return success;
- In
Read.Simple.c:93:
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
PersonDeinit(&person);
return success;
}
StrDeinit(&json);
ConfigDeinit(&config);
return success;
StrIter si = StrIterFromStr(json);
Vec(Str) languages = VecInitWithDeepCopy(NULL, StrDeinit);
JR_OBJ(si, {
}
StrDeinit(&json);
VecDeinit(&languages);
return success;
}
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
return success;
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
return success;
}
SimpleProduct product = {0};
product.name = StrInit();
product.tags = VecInitWithDeepCopyT(product.tags, NULL, StrDeinit);
JR_OBJ(si, {
}
StrDeinit(&json);
SimpleProductDeinit(&product);
return success;
// Cleanup functions
void PersonDeinit(Person *person) {
StrDeinit(&person->name);
}
void ConfigDeinit(Config *config) {
StrDeinit(&config->log_level);
}
void SimpleProductDeinit(SimpleProduct *product) {
StrDeinit(&product->name);
VecDeinit(&product->tags);
}
}
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
}
}
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
return success;
StrDeinit(&json);
StrDeinit(&name);
StrDeinit(&city);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
PersonDeinit(&person);
return success;
}
StrDeinit(&json);
ConfigDeinit(&config);
return success;
Str json = StrInit();
Vec(Str) languages = VecInitWithDeepCopy(NULL, StrDeinit);
// Create strings and push them properly
}
StrDeinit(&json);
VecDeinit(&languages);
return success;
}
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
return success;
StrDeinit(&json);
StrDeinit(&data.user.name);
StrDeinit(&data.user.email);
return success;
}
product.name = StrInitFromZstr("Laptop");
product.price = 999.99;
product.tags = VecInitWithDeepCopyT(product.tags, NULL, StrDeinit);
// Create strings and push them properly
}
StrDeinit(&json);
SimpleProductDeinit(&product);
return success;
- In
Read.Nested.c:34:
void AnnSymbolDeinit(AnnSymbol *sym) {
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
- In
Read.Nested.c:35:
void AnnSymbolDeinit(AnnSymbol *sym) {
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
- In
Read.Nested.c:36:
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
}
- In
Read.Nested.c:37:
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
}
- In
Read.Nested.c:72:
void FunctionInfoDeinit(FunctionInfo *info) {
StrDeinit(&info->name);
}
- In
Read.Nested.c:76:
void ModelInfoDeinit(ModelInfo *info) {
StrDeinit(&info->name);
}
- In
Read.Nested.c:80:
void SearchResultDeinit(SearchResult *result) {
StrDeinit(&result->binary_name);
StrDeinit(&result->sha256);
VecForeach(&result->tags, tag) {
- In
Read.Nested.c:81:
void SearchResultDeinit(SearchResult *result) {
StrDeinit(&result->binary_name);
StrDeinit(&result->sha256);
VecForeach(&result->tags, tag) {
StrDeinit(&tag);
- In
Read.Nested.c:83:
StrDeinit(&result->sha256);
VecForeach(&result->tags, tag) {
StrDeinit(&tag);
}
VecDeinit(&result->tags);
- In
Read.Nested.c:86:
}
VecDeinit(&result->tags);
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
- In
Read.Nested.c:87:
VecDeinit(&result->tags);
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
}
- In
Read.Nested.c:88:
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
StrDeinit(&data.name);
return success;
StrDeinit(&json);
StrDeinit(&data.name);
return success;
}
}
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
return success;
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
return success;
}
}
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
return success;
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
return success;
}
}
StrDeinit(&json);
VecDeinit(&symbols);
return success;
}
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
return success;
}
StrDeinit(&json);
StrDeinit(&info.name);
return success;
StrDeinit(&json);
StrDeinit(&info.name);
return success;
}
}
StrDeinit(&json);
StrDeinit(&info.name);
return success;
StrDeinit(&json);
StrDeinit(&info.name);
return success;
}
result.binary_name = StrInit();
result.sha256 = StrInit();
result.tags = VecInitWithDeepCopyT(result.tags, NULL, StrDeinit);
result.created_at = StrInit();
result.model_name = StrInit();
}
StrDeinit(&json);
SearchResultDeinit(&result);
return success;
}
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
return success;
}
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
return success;
void EdgeCaseDataDeinit(EdgeCaseData *data) {
StrDeinit(&data->empty_string);
VecDeinit(&data->empty_array);
VecDeinit(&data->numbers);
}
StrDeinit(&json1);
StrDeinit(&json2);
return success;
StrDeinit(&json1);
StrDeinit(&json2);
return success;
}
StrIter si2 = StrIterFromStr(json2);
Vec(Str) data = VecInitWithDeepCopy(NULL, StrDeinit);
JR_OBJ(si2, {
}
StrDeinit(&json1);
StrDeinit(&json2);
VecDeinit(&items);
StrDeinit(&json1);
StrDeinit(&json2);
VecDeinit(&items);
VecDeinit(&data);
}
StrDeinit(&json);
StrDeinit(&obj.name);
StrDeinit(&obj.description);
StrDeinit(&json);
StrDeinit(&obj.name);
StrDeinit(&obj.description);
return success;
StrDeinit(&json);
StrDeinit(&obj.name);
StrDeinit(&obj.description);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
StrDeinit(&obj.path);
StrDeinit(&obj.message);
StrDeinit(&json);
StrDeinit(&obj.path);
StrDeinit(&obj.message);
StrDeinit(&obj.data);
StrDeinit(&json);
StrDeinit(&obj.path);
StrDeinit(&obj.message);
StrDeinit(&obj.data);
return success;
StrDeinit(&obj.path);
StrDeinit(&obj.message);
StrDeinit(&obj.data);
return success;
}
}
StrDeinit(&json);
StrDeinit(&obj.escaped);
StrDeinit(&obj.backslash);
StrDeinit(&json);
StrDeinit(&obj.escaped);
StrDeinit(&obj.backslash);
StrDeinit(&obj.newline);
StrDeinit(&json);
StrDeinit(&obj.escaped);
StrDeinit(&obj.backslash);
StrDeinit(&obj.newline);
StrDeinit(&obj.tab);
StrDeinit(&obj.escaped);
StrDeinit(&obj.backslash);
StrDeinit(&obj.newline);
StrDeinit(&obj.tab);
return success;
StrDeinit(&obj.backslash);
StrDeinit(&obj.newline);
StrDeinit(&obj.tab);
return success;
}
}
StrDeinit(&json);
StrDeinit(&obj.name);
return success;
StrDeinit(&json);
StrDeinit(&obj.name);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
VecDeinit(&obj.filled_items);
return success;
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
}
}
StrDeinit(&json);
return success;
}
Vec(i32) empty_numbers = VecInit();
Vec(Str) empty_strings = VecInitWithDeepCopy(NULL, StrDeinit);
JW_OBJ(json, {
}
StrDeinit(&json);
VecDeinit(&empty_numbers);
VecDeinit(&empty_strings);
}
StrDeinit(&json);
StrDeinit(&empty_name);
StrDeinit(&empty_desc);
StrDeinit(&json);
StrDeinit(&empty_name);
StrDeinit(&empty_desc);
return success;
StrDeinit(&json);
StrDeinit(&empty_name);
StrDeinit(&empty_desc);
return success;
}
}
StrDeinit(&json);
return success;
}
WriteFmtLn("[DEBUG] Large numbers JSON: {}", json);
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
StrDeinit(&path);
StrDeinit(&message);
StrDeinit(&json);
StrDeinit(&path);
StrDeinit(&message);
StrDeinit(&data);
StrDeinit(&json);
StrDeinit(&path);
StrDeinit(&message);
StrDeinit(&data);
return success;
StrDeinit(&path);
StrDeinit(&message);
StrDeinit(&data);
return success;
}
}
StrDeinit(&json);
StrDeinit("es);
StrDeinit(&backslash);
StrDeinit(&json);
StrDeinit("es);
StrDeinit(&backslash);
StrDeinit(&newline);
StrDeinit(&json);
StrDeinit("es);
StrDeinit(&backslash);
StrDeinit(&newline);
StrDeinit(&tab);
StrDeinit("es);
StrDeinit(&backslash);
StrDeinit(&newline);
StrDeinit(&tab);
return success;
StrDeinit(&backslash);
StrDeinit(&newline);
StrDeinit(&tab);
return success;
}
}
StrDeinit(&json);
VecDeinit(&empty_list);
return success;
}
StrDeinit(&json);
VecDeinit(&empty_arr);
VecDeinit(&filled_arr);
}
StrDeinit(&json);
return success;
}
}
StrDeinit(&json);
return success;
}
success = false;
StrDeinit(&json1);
StrDeinit(&json2);
StrDeinit(&json3);
StrDeinit(&json1);
StrDeinit(&json2);
StrDeinit(&json3);
StrDeinit(&json4);
StrDeinit(&json1);
StrDeinit(&json2);
StrDeinit(&json3);
StrDeinit(&json4);
StrDeinit(&single_str);
StrDeinit(&json2);
StrDeinit(&json3);
StrDeinit(&json4);
StrDeinit(&single_str);
return success;
StrDeinit(&json3);
StrDeinit(&json4);
StrDeinit(&single_str);
return success;
}
// Cleanup functions
void AnnSymbolDeinit(AnnSymbol *sym) {
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
void AnnSymbolDeinit(AnnSymbol *sym) {
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
StrDeinit(&sym->analysis_name);
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
}
StrDeinit(&sym->function_name);
StrDeinit(&sym->sha256);
StrDeinit(&sym->function_mangled_name);
}
void FunctionInfoDeinit(FunctionInfo *info) {
StrDeinit(&info->name);
}
void SearchResultDeinit(SearchResult *result) {
StrDeinit(&result->binary_name);
StrDeinit(&result->sha256);
VecDeinit(&result->tags);
void SearchResultDeinit(SearchResult *result) {
StrDeinit(&result->binary_name);
StrDeinit(&result->sha256);
VecDeinit(&result->tags);
StrDeinit(&result->created_at);
StrDeinit(&result->sha256);
VecDeinit(&result->tags);
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
VecDeinit(&result->tags);
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
}
StrDeinit(&result->created_at);
StrDeinit(&result->model_name);
StrDeinit(&result->owned_by);
}
}
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
StrDeinit(&expected_str);
StrDeinit(&output_clean);
StrDeinit(&expected_clean);
return result;
}
}
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
return success;
StrDeinit(&json);
StrDeinit(&data.user.profile.name);
StrDeinit(&data.status);
return success;
}
}
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
return success;
StrDeinit(&json);
StrDeinit(&data.company.departments.engineering.head);
StrDeinit(&data.company.name);
return success;
}
});
StrDeinit(&target_key);
}
});
});
StrDeinit(&source_key);
});
});
}
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
StrDeinit(&json);
StrDeinit(&response.message);
VecDeinit(&response.data);
return success;
}
StrDeinit(&json);
VecDeinit(&functions);
return success;
result.analysis_id = 999;
result.sha256 = StrInitFromZstr("abc123");
result.tags = VecInitWithDeepCopyT(result.tags, NULL, StrDeinit);
// Create strings and push them properly
}
StrDeinit(&json);
SearchResultDeinit(&result);
return success;
});
StrDeinit(&target_key);
});
});
StrDeinit(&source_key);
}
});
}
StrDeinit(&json);
VecDeinit(&symbols);
return success;
}
StrDeinit(&json);
StrDeinit(&deep_message);
StrDeinit(&test_name);
StrDeinit(&json);
StrDeinit(&deep_message);
StrDeinit(&test_name);
return success;
StrDeinit(&json);
StrDeinit(&deep_message);
StrDeinit(&test_name);
return success;
}
VecPushBack(&numbers, num3);
Vec(Str) strings = VecInitWithDeepCopy(NULL, StrDeinit);
// Create strings and push them properly
}
StrDeinit(&json);
VecDeinit(&numbers);
VecDeinit(&strings);
- In
MisraEnum.c:207:
}
StrDeinit(&invalid_enum.name);
StrDeinit(&invalid_enum.str);
StrDeinit(&enum_name);
- In
MisraEnum.c:208:
StrDeinit(&invalid_enum.name);
StrDeinit(&invalid_enum.str);
StrDeinit(&enum_name);
StrDeinit(&code);
- In
MisraEnum.c:209:
StrDeinit(&invalid_enum.name);
StrDeinit(&invalid_enum.str);
StrDeinit(&enum_name);
StrDeinit(&code);
- In
MisraEnum.c:210:
StrDeinit(&invalid_enum.str);
StrDeinit(&enum_name);
StrDeinit(&code);
VecForeach(&entries, e) {
- In
MisraEnum.c:213:
VecForeach(&entries, e) {
StrDeinit(&e.name);
StrDeinit(&e.str);
};
- In
MisraEnum.c:214:
VecForeach(&entries, e) {
StrDeinit(&e.name);
StrDeinit(&e.str);
};
VecDeinit(&entries);
- In
MisraDoc.c:33:
}
StrDeinit(&p->build_dir);
VecDeinit(&p->source_directories);
VecDeinit(&p->test_directories);
- In
MisraDoc.c:111:
// read project config
Str config = StrInit();
Scope(&config, StrDeinit, {
if (!ReadCompleteFile(config_path, &config.data, &config.length, &config.capacity)) {
LOG_FATAL("Failed to read config file.");
- In
MisraDoc.c:123:
Scope(&file_paths, VecDeinit, {
// temporary vector to store all directory paths to explore files in
Strs dir_paths = VecInitWithDeepCopy(NULL, StrDeinit);
Scope(&dir_paths, VecDeinit, {
VecMerge(&dir_paths, &project.source_directories);
- In
MisraDoc.c:167:
VecForeach(&file_paths, file_path) {
Str file_contents = StrInit();
Scope(&file_contents, StrDeinit, {
if (!ReadCompleteFile(file_path.data, &file_contents.data, &file_contents.length, &file_contents.capacity)) {
LOG_ERROR("Failed to read \"{}\" source file.", file_path.data);
- In
MisraDoc.c:174:
Str output_path = StrInit();
Scope(&output_path, StrDeinit, {
StrMerge(&output_path, &file_path);
LOG_INFO("{}", output_path);
- In
MisraDoc.c:181:
Str md_code = StrInit();
Scope(&md_code, StrDeinit, {
// Create template strings for StrWriteFmt with escaped braces
const char *mdHeader =
- In
Main.c:16:
if (rule_name.length) {
WriteFmtLn("Got Rule : {}", rule_name);
StrDeinit(&rule_name);
}
}
- In
JSON.h:452:
if (read_si.pos == si.pos) { \
LOG_ERROR("Failed to parse value. Invalid JSON."); \
StrDeinit(&key); \
failed = true; \
si = saved_si; \
- In
JSON.h:540:
if (read_si.pos == si.pos) { \
LOG_ERROR("Failed to read string key in object. Invalid JSON"); \
StrDeinit(&key); \
failed = true; \
si = saved_si; \
- In
JSON.h:552:
if (StrIterPeek(&si) != ':') { \
LOG_ERROR("Expected ':' after key string. Failed to read JSON"); \
StrDeinit(&key); \
failed = true; \
si = saved_si; \
- In
JSON.h:574:
if (read_si.pos == si.pos) { \
LOG_ERROR("Failed to parse value. Invalid JSON."); \
StrDeinit(&key); \
failed = true; \
si = saved_si; \
- In
JSON.h:583:
si = read_si; \
} \
StrDeinit(&key); \
si = JSkipWhitespace(si); \
\
- In
Log.h:37:
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
SysAbort(); \
} while (0)
- In
Log.h:56:
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_ERROR, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:74:
StrWriteFmt(&m_, __VA_ARGS__); \
LogWrite(LOG_MESSAGE_TYPE_INFO, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:100:
}); \
LogWrite(LOG_MESSAGE_TYPE_FATAL, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
SysAbort(); \
} while (0)
- In
Log.h:127:
}); \
LogWrite(LOG_MESSAGE_TYPE_ERROR, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Log.h:153:
}); \
LogWrite(LOG_MESSAGE_TYPE_INFO, __func__, __LINE__, m_.data); \
StrDeinit(&m_); \
} while (0)
- In
Io.h:428:
fwrite(out_.data, 1, out_.length, (stream)); \
fflush(stream); \
StrDeinit(&out_); \
} while (0)
- In
Io.h:467:
fputc('\n', (stream)); \
fflush(stream); \
StrDeinit(&out_); \
} while (0)
- In
Proc.h:169:
const char *in_ = b_.data; \
StrReadFmt(in_, __VA_ARGS__); \
StrDeinit(&b_); \
} while (0)
- In
Proc.h:178:
const char *in_ = b_.data; \
StrReadFmt(in_, __VA_ARGS__); \
StrDeinit(&b_); \
} while (0)
- In
Proc.h:186:
StrWriteFmt(&b_, __VA_ARGS__); \
SysProcWriteToStdin((p), &b_); \
StrDeinit(&b_); \
} while (0)
- In
Proc.h:195:
StrPushBack(&b_, '\n'); \
SysProcWriteToStdin((p), &b_); \
StrDeinit(&b_); \
} while (0)
- In
Str.c:35:
void deinit_str(Str *str) {
StrDeinit(str);
}
- In
Str.c:42:
case STR_INIT : {
// Reinitialize the string
StrDeinit(str);
*str = StrInit();
break;
- In
Str.c:51:
char *cstr = generate_cstring(data, offset, size, 50);
if (cstr) {
StrDeinit(str);
*str = StrInitFromCstr(cstr, strlen(cstr));
free(cstr);
- In
Str.c:63:
char *zstr = generate_cstring(data, offset, size, 50);
if (zstr) {
StrDeinit(str);
*str = StrInitFromZstr(zstr);
free(zstr);
- In
Str.c:74:
if (VecLen(str) > 0) {
Str temp = StrInitFromStr(str);
StrDeinit(str);
*str = temp;
}
- In
Str.c:83:
if (VecLen(str) > 0) {
Str temp = StrDup(str);
StrDeinit(str);
*str = temp;
}
- In
Str.c:90:
case STR_DEINIT : {
StrDeinit(str);
*str = StrInit(); // Reinitialize for continued fuzzing
break;
- In
Str.c:187:
int result = StrCmp(str, &temp);
(void)result; // Suppress unused variable warning
StrDeinit(&temp);
}
break;
- In
Str.c:221:
char *found = StrFindStr(str, &temp);
(void)found; // Suppress unused variable warning
StrDeinit(&temp);
}
break;
- In
Str.c:289:
Str temp = generate_str_from_input(data, offset, size, 20);
StrInsert(str, &temp, idx);
StrDeinit(&temp);
}
break;
- In
Str.c:343:
Str temp = generate_str_from_input(data, offset, size, 20);
StrMerge(str, &temp);
StrDeinit(&temp);
break;
}
- In
Str.c:425:
Str temp = generate_str_from_input(data, offset, size, 20);
StrMerge(str, &temp);
StrDeinit(&temp);
break;
}
- In
Str.c:454:
Str temp = generate_str_from_input(data, offset, size, 20);
StrMerge(str, &temp);
StrDeinit(&temp);
break;
}
- In
VecStr.c:38:
void init_str_vec(StrVec *vec) {
*vec = VecInitWithDeepCopyT(*vec, NULL, StrDeinit);
}
- In
VecStr.c:350:
if (*offset + 4 <= size) {
// Create a temporary vector for merging
StrVec temp = VecInitWithDeepCopyT(temp, NULL, StrDeinit);
// Add some strings to temp
- In
VecStr.c:410:
if (*offset + 4 <= size) {
// Create a temporary vector for cloning
StrVec temp = VecInitWithDeepCopyT(temp, NULL, StrDeinit);
// Add some strings to temp