summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-08-28 16:11:20 -0700
committerVincent Sanders <vince@netsurf-browser.org>2012-08-28 16:11:20 -0700
commite3e74235de5a800fe421b4c74059d926a298361d (patch)
treeb90a47f2919d38d8dfba64abded94fe534ff2a9a
parentf6953cb68e18521361e18b6b7d504742263998ea (diff)
downloadlibhubbub-e3e74235de5a800fe421b4c74059d926a298361d.tar.gz
libhubbub-e3e74235de5a800fe421b4c74059d926a298361d.tar.bz2
update for json-c 0.10 API
-rw-r--r--test/tokeniser2.c13
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,