diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2012-08-28 16:11:20 -0700 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2012-08-28 16:11:20 -0700 |
commit | e3e74235de5a800fe421b4c74059d926a298361d (patch) | |
tree | b90a47f2919d38d8dfba64abded94fe534ff2a9a /test | |
parent | f6953cb68e18521361e18b6b7d504742263998ea (diff) | |
download | libhubbub-e3e74235de5a800fe421b4c74059d926a298361d.tar.gz libhubbub-e3e74235de5a800fe421b4c74059d926a298361d.tar.bz2 |
update for json-c 0.10 API
Diffstat (limited to 'test')
-rw-r--r-- | test/tokeniser2.c | 13 |
1 files 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, |