simplify the rendering code so there's no 'realloc' going on.

That seemed horribly inefficient to me.
Now we use multiple passes and can test for failure more carefully.


git-svn-id: http://svn.code.sf.net/p/cjson/code@12 e3330c51-1366-4df0-8b21-3ccf24e3d50e
This commit is contained in:
Dave Gamble
2009-11-10 22:57:37 +00:00
parent 37da1d2493
commit 5cca4e2c57
2 changed files with 83 additions and 33 deletions

View File

@@ -53,7 +53,6 @@ typedef struct cJSON {
typedef struct cJSON_Hooks {
void *(*malloc_fn)(size_t sz);
void *(*realloc_fn)(void *ptr, size_t sz);
void (*free_fn)(void *ptr);
} cJSON_Hooks;