| 1193 | } |
| 1194 | |
| 1195 | CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cJSON_bool fmt) |
| 1196 | { |
| 1197 | printbuffer p = { 0, 0, 0, 0, 0, 0, { 0, 0, 0 } }; |
| 1198 | |
| 1199 | if ((len < 0) || (buf == NULL)) |
| 1200 | { |
| 1201 | return false; |
| 1202 | } |
| 1203 | |
| 1204 | p.buffer = (unsigned char*)buf; |
| 1205 | p.length = (size_t)len; |
| 1206 | p.offset = 0; |
| 1207 | p.noalloc = true; |
| 1208 | p.format = fmt; |
| 1209 | p.hooks = global_hooks; |
| 1210 | |
| 1211 | return print_value(item, &p); |
| 1212 | } |
| 1213 | |
| 1214 | /* Parser core - when encountering text, process appropriately. */ |
| 1215 | static cJSON_bool parse_value(cJSON * const item, parse_buffer * const input_buffer) |
nothing calls this directly
no test coverage detected