diff --git a/src/api/yajl_gen.h b/src/api/yajl_gen.h index 36593e97..5ae4c5c7 100644 --- a/src/api/yajl_gen.h +++ b/src/api/yajl_gen.h @@ -114,7 +114,7 @@ extern "C" { * * \returns an allocated handle on success, NULL on failure (bad params) */ - yajl_gen YAJL_API yajl_gen_alloc2(yajl_print_t callback, + yajl_gen YAJL_API yajl_gen_alloc2(const yajl_print_t callback, const yajl_gen_config * config, const yajl_alloc_funcs * allocFuncs, void * ctx); diff --git a/src/yajl_encode.c b/src/yajl_encode.c index c3b02ed8..da216ab6 100644 --- a/src/yajl_encode.c +++ b/src/yajl_encode.c @@ -48,7 +48,7 @@ void yajl_string_encode(yajl_buf buf, const unsigned char * str, unsigned int len) { - yajl_string_encode2((yajl_print_t) &yajl_buf_append, buf, str, len); + yajl_string_encode2((const yajl_print_t) &yajl_buf_append, buf, str, len); } void diff --git a/src/yajl_encode.h b/src/yajl_encode.h index 3f5b2363..af6878f0 100644 --- a/src/yajl_encode.h +++ b/src/yajl_encode.h @@ -36,7 +36,7 @@ #include "yajl_buf.h" #include "api/yajl_gen.h" -void yajl_string_encode2(yajl_print_t printer, +void yajl_string_encode2(const yajl_print_t printer, void * ctx, const unsigned char * str, unsigned int length); diff --git a/src/yajl_gen.c b/src/yajl_gen.c index 8b7fce2c..7d7becc9 100644 --- a/src/yajl_gen.c +++ b/src/yajl_gen.c @@ -70,7 +70,7 @@ yajl_gen_alloc(const yajl_gen_config * config, } yajl_gen -yajl_gen_alloc2(yajl_print_t callback, +yajl_gen_alloc2(const yajl_print_t callback, const yajl_gen_config * config, const yajl_alloc_funcs * afs, void * ctx)