MCPcopy Create free account
hub / github.com/Netis/cloud-probe / cJSON_PrintPreallocated

Function cJSON_PrintPreallocated

cpworker/src/cJSON/cJSON.c:1305–1322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

unix_client_sendFunction · 0.85

Calls 1

print_valueFunction · 0.85

Tested by

no test coverage detected