add json_tokener_parse_verbose, and return NULL on parser errors

git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@62 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
Jehiah Czebotar
2010-12-08 03:52:07 +00:00
parent 5644272f03
commit a503ee8217
4 changed files with 34 additions and 5 deletions

3
bits.h
View File

@@ -22,6 +22,7 @@
#define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9)
#define error_ptr(error) ((void*)error)
#define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L)
#define error_description(error) (json_tokener_errors[error])
#define is_error(ptr) (ptr == NULL)
#endif