| 1284 | } |
| 1285 | |
| 1286 | CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format) |
| 1287 | { |
| 1288 | printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; |
| 1289 | |
| 1290 | if ((length < 0) || (buffer == NULL)) |
| 1291 | { |
| 1292 | return false; |
| 1293 | } |
| 1294 | |
| 1295 | p.buffer = (unsigned char*)buffer; |
| 1296 | p.length = (size_t)length; |
| 1297 | p.offset = 0; |
| 1298 | p.noalloc = true; |
| 1299 | p.format = format; |
| 1300 | p.hooks = global_hooks; |
| 1301 | |
| 1302 | return print_value(item, &p); |
| 1303 | } |
| 1304 | |
| 1305 | /* Parser core - when encountering text, process appropriately. */ |
| 1306 | static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) |
nothing calls this directly
no test coverage detected