Skip to content

Commit

Permalink
silence a const related warning by always passing around a const yajl…
Browse files Browse the repository at this point in the history
…_print_t ptr (uh, thanks visual studio)
  • Loading branch information
lloyd committed Dec 18, 2009
1 parent 0267389 commit c439d89
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api/yajl_gen.h
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/yajl_encode.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/yajl_encode.h
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/yajl_gen.c
Expand Up @@ -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)
Expand Down

0 comments on commit c439d89

Please sign in to comment.