From e3e74235de5a800fe421b4c74059d926a298361d Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 28 Aug 2012 16:11:20 -0700 Subject: update for json-c 0.10 API --- test/tokeniser2.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/tokeniser2.c b/test/tokeniser2.c index 82caf20..59c9cb9 100644 --- a/test/tokeniser2.c +++ b/test/tokeniser2.c @@ -83,11 +83,9 @@ int main(int argc, char **argv) printf("Test: %s\n", json_object_get_string(val)); } else if (strcmp(key, "input") == 0) { - int len; ctx.input = (const uint8_t *) - json_object_get_string_len(val, - &len); - ctx.input_len = len; + json_object_get_string(val); + ctx.input_len = json_object_get_string_len(val); } else if (strcmp(key, "output") == 0) { ctx.output = json_object_get_array(val); ctx.output_index = 0; @@ -427,9 +425,10 @@ hubbub_error token_handler(const hubbub_token *token, void *pw) break; case HUBBUB_TOKEN_CHARACTER: { - int expstrlen; - char *expstr = json_object_get_string_len( - array_list_get_idx(items, 1), &expstrlen); + int expstrlen = json_object_get_string_len( + array_list_get_idx(items, 1)); + char *expstr =json_object_get_string( + array_list_get_idx(items, 1)); const char *gotstr = (const char *) token->data.character.ptr; size_t len = min(token->data.character.len, -- cgit v1.2.3