forked from lloyd/yajl
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* BREAKING API CHANGE: allow client to specify memory allocation rou…
…tines * 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
- Loading branch information
Showing
67 changed files
with
404 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
* add a test for 0x1F bug | ||
* numeric overflow in integers and double | ||
* line and char offsets in the lexer and in error messages | ||
* numbers at eof bug. client must have a way of indicating 'end of input' | ||
(other than passing in a ' ' whitespace byte), | ||
problem illustrated with lonely number test case. | ||
* testing: | ||
a. the permuter | ||
b. some performance comparison against json_checker. | ||
* investigate pull instead of push parsing | ||
* Handle memory allocation failures gracefully | ||
* allow client to override malloc/calloc/free impl. | ||
* cygwin/msys support on win32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* 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 | ||
* met: | ||
* | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in | ||
* the documentation and/or other materials provided with the | ||
* distribution. | ||
* | ||
* 3. Neither the name of Lloyd Hilaiel nor the names of its | ||
* contributors may be used to endorse or promote products derived | ||
* from this software without specific prior written permission. | ||
* | ||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, | ||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
* POSSIBILITY OF SUCH DAMAGE. | ||
*/ | ||
|
||
/** | ||
* \file yajl_alloc.h | ||
* default memory allocation routines for yajl which use malloc/realloc and | ||
* free | ||
*/ | ||
|
||
#include "yajl_alloc.h" | ||
#include <stdlib.h> | ||
|
||
static void * yajl_internal_malloc(void *ctx, unsigned int sz) | ||
{ | ||
return malloc(sz); | ||
} | ||
|
||
static void * yajl_internal_realloc(void *ctx, void * previous, | ||
unsigned int sz) | ||
{ | ||
return realloc(previous, sz); | ||
} | ||
|
||
static void yajl_internal_free(void *ctx, void * ptr) | ||
{ | ||
free(ptr); | ||
} | ||
|
||
void yajl_set_default_alloc_funcs(yajl_alloc_funcs * yaf) | ||
{ | ||
yaf->malloc = yajl_internal_malloc; | ||
yaf->free = yajl_internal_free; | ||
yaf->realloc = yajl_internal_realloc; | ||
yaf->ctx = NULL; | ||
} | ||
|
Oops, something went wrong.