| 1497 CxJsonValue* cxJsonClone(const CxJsonValue* value, const CxAllocator* allocator) { |
1497 CxJsonValue* cxJsonClone(const CxJsonValue* value, const CxAllocator* allocator) { |
| 1498 return cx_json_clone_func(NULL, value, allocator, NULL); |
1498 return cx_json_clone_func(NULL, value, allocator, NULL); |
| 1499 } |
1499 } |
| 1500 |
1500 |
| 1501 CxJsonValue* cx_json_clone_func(CxJsonValue* target, const CxJsonValue* source, |
1501 CxJsonValue* cx_json_clone_func(CxJsonValue* target, const CxJsonValue* source, |
| 1502 const CxAllocator* allocator, cx_attr_unused void *data) { |
1502 const CxAllocator* allocator, CX_UNUSED void *data) { |
| 1503 if (source == NULL || source->type == CX_JSON_NOTHING) { |
1503 if (source == NULL || source->type == CX_JSON_NOTHING) { |
| 1504 return &cx_json_value_nothing; |
1504 return &cx_json_value_nothing; |
| 1505 } |
1505 } |
| 1506 if (allocator == NULL) allocator = cxDefaultAllocator; |
1506 if (allocator == NULL) allocator = cxDefaultAllocator; |
| 1507 |
1507 |