diff options
author | Lloyd Hilaiel <lloyd@hilaiel.com> | 2009-12-18 09:55:09 -0800 |
---|---|---|
committer | Lloyd Hilaiel <lloyd@hilaiel.com> | 2009-12-18 09:55:09 -0800 |
commit | c84845b0263b9446c35118140e9daaaa921a74fa (patch) | |
tree | 8da237134d70ac75e9daf558deba2fee77ef03b6 | |
parent | c439d89f9016f8178e7d3f752784075e370785c5 (diff) | |
parent | 76994fa597193d51b979854a6c65767ad104605d (diff) | |
download | yajl-c84845b0263b9446c35118140e9daaaa921a74fa.tar.gz |
Merge branch 'master' of git://github.com/bluemarvin/yajl
Conflicts:
src/api/yajl_gen.h
src/api/yajl_parse.h
-rw-r--r-- | src/api/yajl_gen.h | 30 | ||||
-rw-r--r-- | src/api/yajl_parse.h | 16 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/api/yajl_gen.h b/src/api/yajl_gen.h index 5ae4c5c..2a8bac7 100644 --- a/src/api/yajl_gen.h +++ b/src/api/yajl_gen.h @@ -94,7 +94,7 @@ extern "C" { * * \returns an allocated handle on success, NULL on failure (bad params) */ - yajl_gen YAJL_API yajl_gen_alloc(const yajl_gen_config * config, + YAJL_API yajl_gen yajl_gen_alloc(const yajl_gen_config * config, const yajl_alloc_funcs * allocFuncs); /** allocate a generator handle that will print to the specified @@ -114,43 +114,43 @@ extern "C" { * * \returns an allocated handle on success, NULL on failure (bad params) */ - yajl_gen YAJL_API yajl_gen_alloc2(const yajl_print_t callback, + YAJL_API yajl_gen yajl_gen_alloc2(const yajl_print_t callback, const yajl_gen_config * config, const yajl_alloc_funcs * allocFuncs, void * ctx); /** free a generator handle */ - void YAJL_API yajl_gen_free(yajl_gen handle); + YAJL_API void yajl_gen_free(yajl_gen handle); - yajl_gen_status YAJL_API yajl_gen_integer(yajl_gen hand, long int number); + YAJL_API yajl_gen_status yajl_gen_integer(yajl_gen hand, long int number); /** generate a floating point number. number may not be infinity or * NaN, as these have no representation in JSON. In these cases the * generator will return 'yajl_gen_invalid_number' */ - yajl_gen_status YAJL_API yajl_gen_double(yajl_gen hand, double number); - yajl_gen_status YAJL_API yajl_gen_number(yajl_gen hand, + YAJL_API yajl_gen_status yajl_gen_double(yajl_gen hand, double number); + YAJL_API yajl_gen_status yajl_gen_number(yajl_gen hand, const char * num, unsigned int len); - yajl_gen_status YAJL_API yajl_gen_string(yajl_gen hand, + YAJL_API yajl_gen_status yajl_gen_string(yajl_gen hand, const unsigned char * str, unsigned int len); - yajl_gen_status YAJL_API yajl_gen_null(yajl_gen hand); - yajl_gen_status YAJL_API yajl_gen_bool(yajl_gen hand, int boolean); - yajl_gen_status YAJL_API yajl_gen_map_open(yajl_gen hand); - yajl_gen_status YAJL_API yajl_gen_map_close(yajl_gen hand); - yajl_gen_status YAJL_API yajl_gen_array_open(yajl_gen hand); - yajl_gen_status YAJL_API yajl_gen_array_close(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_null(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_bool(yajl_gen hand, int boolean); + YAJL_API yajl_gen_status yajl_gen_map_open(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_map_close(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_array_open(yajl_gen hand); + YAJL_API yajl_gen_status yajl_gen_array_close(yajl_gen hand); /** access the null terminated generator buffer. If incrementally * outputing JSON, one should call yajl_gen_clear to clear the * buffer. This allows stream generation. */ - yajl_gen_status YAJL_API yajl_gen_get_buf(yajl_gen hand, + YAJL_API yajl_gen_status yajl_gen_get_buf(yajl_gen hand, const unsigned char ** buf, unsigned int * len); /** clear yajl's output buffer, but maintain all internal generation * state. This function will not "reset" the generator state, and is * intended to enable incremental JSON outputing. */ - void YAJL_API yajl_gen_clear(yajl_gen hand); + YAJL_API void yajl_gen_clear(yajl_gen hand); #ifdef __cplusplus } diff --git a/src/api/yajl_parse.h b/src/api/yajl_parse.h index e3c2f13..ede1e5b 100644 --- a/src/api/yajl_parse.h +++ b/src/api/yajl_parse.h @@ -59,7 +59,7 @@ extern "C" { } yajl_status; /** attain a human readable, english, string for an error */ - const char * YAJL_API yajl_status_to_string(yajl_status code); + YAJL_API const char * yajl_status_to_string(yajl_status code); /** an opaque handle to a parser */ typedef struct yajl_handle_t * yajl_handle; @@ -127,20 +127,20 @@ extern "C" { * \param config configuration parameters for the parse. * \param ctx a context pointer that will be passed to callbacks. */ - yajl_handle YAJL_API yajl_alloc(const yajl_callbacks * callbacks, + YAJL_API yajl_handle yajl_alloc(const yajl_callbacks * callbacks, const yajl_parser_config * config, const yajl_alloc_funcs * allocFuncs, void * ctx); /** free a parser handle */ - void YAJL_API yajl_free(yajl_handle handle); + YAJL_API void yajl_free(yajl_handle handle); /** Parse some json! * \param hand - a handle to the json parser allocated with yajl_alloc * \param jsonText - a pointer to the UTF8 json text to be parsed * \param jsonTextLength - the length, in bytes, of input text */ - yajl_status YAJL_API yajl_parse(yajl_handle hand, + YAJL_API yajl_status yajl_parse(yajl_handle hand, const unsigned char * jsonText, unsigned int jsonTextLength); @@ -153,7 +153,7 @@ extern "C" { * * \param hand - a handle to the json parser allocated with yajl_alloc */ - yajl_status yajl_parse_complete(yajl_handle hand); + YAJL_API yajl_status yajl_parse_complete(yajl_handle hand); /** get an error string describing the state of the * parse. @@ -165,7 +165,7 @@ extern "C" { * \returns A dynamically allocated string will be returned which should * be freed with yajl_free_error */ - unsigned char * YAJL_API yajl_get_error(yajl_handle hand, int verbose, + YAJL_API unsigned char * yajl_get_error(yajl_handle hand, int verbose, const unsigned char * jsonText, unsigned int jsonTextLength); @@ -181,10 +181,10 @@ extern "C" { * chunk where the error occured. 0 will be returned if no error * was encountered. */ - unsigned int YAJL_API yajl_get_bytes_consumed(yajl_handle hand); + YAJL_API unsigned int yajl_get_bytes_consumed(yajl_handle hand); /** free an error returned from yajl_get_error */ - void YAJL_API yajl_free_error(yajl_handle hand, unsigned char * str); + YAJL_API void yajl_free_error(yajl_handle hand, unsigned char * str); #ifdef __cplusplus } |