| 417 if (json->vbuf != json->vbuf_internal) { |
417 if (json->vbuf != json->vbuf_internal) { |
| 418 free(json->vbuf); |
418 free(json->vbuf); |
| 419 } |
419 } |
| 420 cxJsonValueFree(json->parsed); |
420 cxJsonValueFree(json->parsed); |
| 421 json->parsed = NULL; |
421 json->parsed = NULL; |
| |
422 if (json->uncompleted_member.name.ptr != NULL) { |
| |
423 cx_strfree_a(json->allocator, &json->uncompleted_member.name); |
| |
424 json->uncompleted_member = (CxJsonObjValue){{NULL, 0}, NULL}; |
| |
425 } |
| 422 } |
426 } |
| 423 |
427 |
| 424 int cxJsonFilln(CxJson *json, const char *buf, size_t size) { |
428 int cxJsonFilln(CxJson *json, const char *buf, size_t size) { |
| 425 if (cxBufferEof(&json->buffer)) { |
429 if (cxBufferEof(&json->buffer)) { |
| 426 // reinitialize the buffer |
430 // reinitialize the buffer |