summaryrefslogtreecommitdiff
path: root/reformatter
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2009-04-01 18:05:07 +0300
committerLloyd Hilaiel <lloyd@hilaiel.com>2009-04-01 18:05:07 +0300
commitb78dd790825e3347422ef8ac56d2ad557a473e8f (patch)
treee1caa8c32bad3281b704d334b1a4d94c561af2ce /reformatter
parentaf305526e77828621de645c4dd4c93f2d76b821b (diff)
downloadyajl-b78dd790825e3347422ef8ac56d2ad557a473e8f.tar.gz
* BREAKING API CHANGE: allow client to specify memory allocation routines
* bump yajl version to 1.0.0 * update TODO list, removing completed tasks * update yajl_test to override allocation routines and count allocations/frees, providing an automated standalone way to validate we're not leaky * update all copyright dates * update all .gold files with new test output * update ChangeLog in preparation for 1.0.0 release
Diffstat (limited to 'reformatter')
-rw-r--r--reformatter/CMakeLists.txt2
-rw-r--r--reformatter/json_reformat.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt
index 5ac7035..5e6a281 100644
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright 2007, Lloyd Hilaiel.
+# Copyright 2007-2009, Lloyd Hilaiel.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
diff --git a/reformatter/json_reformat.c b/reformatter/json_reformat.c
index b1c2ee7..d117179 100644
--- a/reformatter/json_reformat.c
+++ b/reformatter/json_reformat.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2007, Lloyd Hilaiel.
+ * Copyright 2007-2009, Lloyd Hilaiel.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -156,10 +156,10 @@ main(int argc, char ** argv)
usage(argv[0]);
}
- g = yajl_gen_alloc(&conf);
+ g = yajl_gen_alloc(&conf, NULL);
/* ok. open file. let's read and parse */
- hand = yajl_alloc(&callbacks, &cfg, (void *) g);
+ hand = yajl_alloc(&callbacks, &cfg, (void *) g, NULL);
while (!done) {
rd = fread((void *) fileData, 1, sizeof(fileData) - 1, stdin);
@@ -185,7 +185,7 @@ main(int argc, char ** argv)
{
unsigned char * str = yajl_get_error(hand, 1, fileData, rd);
fprintf(stderr, (const char *) str);
- yajl_free_error(str);
+ yajl_free_error(hand, str);
} else {
const unsigned char * buf;
unsigned int len;