| 968 | } |
| 969 | |
| 970 | int cJSON_PrintPreallocated(cJSON *item, char *buf, const int len, const cjbool fmt) |
| 971 | { |
| 972 | printbuffer p; |
| 973 | |
| 974 | if (len < 0) |
| 975 | { |
| 976 | return false; |
| 977 | } |
| 978 | |
| 979 | memset(&p, 0, sizeof(p)); |
| 980 | p.buffer = (unsigned char*)buf; |
| 981 | p.length = (size_t)len; |
| 982 | p.offset = 0; |
| 983 | p.noalloc = true; |
| 984 | return print_value(item, 0, fmt, &p) != NULL; |
| 985 | } |
| 986 | |
| 987 | int cJSON_PrintFlushed(cJSON *item, char *buf, const int len, const int fmt, flush_fn *func, void *param) |
| 988 | { |
no test coverage detected