MCPcopy Create free account
hub / github.com/esnet/iperf / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

src/cjson.c:1303–1320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1301}
1302
1303CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
1304{
1305 printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };
1306
1307 if ((length < 0) || (buffer == NULL))
1308 {
1309 return false;
1310 }
1311
1312 p.buffer = (unsigned char*)buffer;
1313 p.length = (size_t)length;
1314 p.offset = 0;
1315 p.noalloc = true;
1316 p.format = format;
1317 p.hooks = global_hooks;
1318
1319 return print_value(item, &p);
1320}
1321
1322/* Parser core - when encountering text, process appropriately. */
1323static 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…