mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 16:35:40 +02:00
Work out more details of how json_free() needs to work.
The idea is that you can free any element once you are done with it, even if it is part of an array or hash that isn't completely read yet. Removing array elements is reasonably well defined because nothing else depends on them. Removing a hash key or value causes it to be replaced by a null unless the other side of the component has already been nulled out, in which case the whole pair is removed.
This commit is contained in:
@@ -33,5 +33,6 @@ typedef struct json_pull json_pull;
|
||||
json_pull *json_begin_file(FILE *f);
|
||||
json_pull *json_begin_string(char *s);
|
||||
json_object *json_parse(json_pull *j);
|
||||
void json_free(json_object *j);
|
||||
|
||||
json_object *json_hash_get(json_object *o, char *s);
|
||||
|
||||
Reference in New Issue
Block a user