| 1295 | } |
| 1296 | |
| 1297 | CJSON_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. */ |
| 1317 | static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) |
nothing calls this directly
no test coverage detected