MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

external/cJSON/cJSON.c:1348–1365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1346}
1347
1348CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format)
1349{
1350 printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } };
1351
1352 if ((length < 0) || (buffer == NULL))
1353 {
1354 return false;
1355 }
1356
1357 p.buffer = (unsigned char*)buffer;
1358 p.length = (size_t)length;
1359 p.offset = 0;
1360 p.noalloc = true;
1361 p.format = format;
1362 p.hooks = global_hooks;
1363
1364 return print_value(item, &p);
1365}
1366
1367/* Parser core - when encountering text, process appropriately. */
1368static 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