MCPcopy Create free account
hub / github.com/TheForceEngine/TheForceEngine / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

TheForceEngine/TFE_System/cJSON.c:1297–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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