summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2009-12-18 09:50:09 -0800
committerLloyd Hilaiel <lloyd@hilaiel.com>2009-12-18 09:50:09 -0800
commitc439d89f9016f8178e7d3f752784075e370785c5 (patch)
tree70dfa38d1a04e60c3da65381b42e83a9964cb3bd
parent02673898ebc130b972b51a4f4652bff357d81d11 (diff)
downloadyajl-c439d89f9016f8178e7d3f752784075e370785c5.tar.gz
silence a const related warning by always passing around a const yajl_print_t ptr (uh, thanks visual studio)
-rw-r--r--src/api/yajl_gen.h2
-rw-r--r--src/yajl_encode.c2
-rw-r--r--src/yajl_encode.h2
-rw-r--r--src/yajl_gen.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/api/yajl_gen.h b/src/api/yajl_gen.h
index 36593e9..5ae4c5c 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 c3b02ed..da216ab 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 3f5b236..af6878f 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 8b7fce2..7d7becc 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)