src/json.c

changeset 1012
21884374edbb
parent 1009
7650e722437e
child 1014
56eb7da4f3e1
equal deleted inserted replaced
1011:838b096c1d08 1012:21884374edbb
631 631
632 return result; 632 return result;
633 } 633 }
634 634
635 void cxJsonValueFree(CxJsonValue *value) { 635 void cxJsonValueFree(CxJsonValue *value) {
636 if (value == NULL || value == &cx_json_value_nothing) return; 636 if (value == NULL || value->type == CX_JSON_NOTHING) return;
637
638 switch (value->type) { 637 switch (value->type) {
639 case CX_JSON_OBJECT: { 638 case CX_JSON_OBJECT: {
640 CxJsonObject obj = value->value.object; 639 CxJsonObject obj = value->value.object;
641 for (size_t i = 0; i < obj.values_size; i++) { 640 for (size_t i = 0; i < obj.values_size; i++) {
642 cxJsonValueFree(obj.values[i].value); 641 cxJsonValueFree(obj.values[i].value);

mercurial