MCPcopy Create free account
hub / github.com/SVF-tools/SVF / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

svf/lib/Util/cJSON.cpp:1295–1312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1293}
1294
1295CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
1296{
1297 printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };
1298
1299 if ((length < 0) || (buffer == NULL))
1300 {
1301 return false;
1302 }
1303
1304 p.buffer = (unsigned char*)buffer;
1305 p.length = (size_t)length;
1306 p.offset = 0;
1307 p.noalloc = true;
1308 p.format = format;
1309 p.hooks = global_hooks;
1310
1311 return print_value(item, &p);
1312}
1313
1314/* Parser core - when encountering text, process appropriately. */
1315static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer)

Callers

nothing calls this directly

Calls 1

print_valueFunction · 0.85

Tested by

no test coverage detected