MCPcopy Create free account
hub / github.com/DaveGamble/cJSON / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

cJSON.c:1343–1360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1341}
1342
1343CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
1344{
1345 printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };
1346
1347 if ((length < 0) || (buffer == NULL))
1348 {
1349 return false;
1350 }
1351
1352 p.buffer = (unsigned char*)buffer;
1353 p.length = (size_t)length;
1354 p.offset = 0;
1355 p.noalloc = true;
1356 p.format = format;
1357 p.hooks = global_hooks;
1358
1359 return print_value(item, &p);
1360}
1361
1362/* Parser core - when encountering text, process appropriately. */
1363static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer)

Calls 1

print_valueFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…