597 cxJsonValueFree(p->read_value); |
597 cxJsonValueFree(p->read_value); |
598 free(p->value_name); |
598 free(p->value_name); |
599 free(p->value_str); |
599 free(p->value_str); |
600 } |
600 } |
601 |
601 |
602 void cxJsonFill(CxJson *p, const char *buf, size_t size) { |
602 int cxJsonFilln(CxJson *p, const char *buf, size_t size) { |
603 // TODO: implement rescue buffer like in CxProperties to allow subsequent fills |
603 // TODO: implement rescue buffer like in CxProperties to allow subsequent fills |
604 p->buffer = buf; |
604 p->buffer = buf; |
605 p->size = size; |
605 p->size = size; |
606 p->pos = 0; |
606 p->pos = 0; |
|
607 return 0; |
607 } |
608 } |
608 |
609 |
609 int cxJsonNext(CxJson *p, CxJsonValue **value) { |
610 int cxJsonNext(CxJson *p, CxJsonValue **value) { |
610 // TODO: replace int with a status enum like in CxProperties |
611 // TODO: replace int with a status enum like in CxProperties |
611 |
612 |