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