From 6481bd7f3a503573c31b224dfde229dce2e9b68f Mon Sep 17 00:00:00 2001 From: Andrew Sidwell Date: Sat, 9 Aug 2008 19:34:52 +0000 Subject: Propagate the use of hubbub_error up into at least a bit of the treebuilder. svn path=/trunk/hubbub/; revision=4979 --- test/tokeniser3.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/tokeniser3.c') diff --git a/test/tokeniser3.c b/test/tokeniser3.c index e67b047..8febda9 100644 --- a/test/tokeniser3.c +++ b/test/tokeniser3.c @@ -28,7 +28,7 @@ typedef struct context { } context; static void run_test(context *ctx); -static void token_handler(const hubbub_token *token, void *pw); +static hubbub_error token_handler(const hubbub_token *token, void *pw); static void *myrealloc(void *ptr, size_t len, void *pw) { @@ -221,7 +221,7 @@ void run_test(context *ctx) } } -void token_handler(const hubbub_token *token, void *pw) +hubbub_error token_handler(const hubbub_token *token, void *pw) { static const char *token_names[] = { "DOCTYPE", "StartTag", "EndTag", @@ -257,7 +257,7 @@ void token_handler(const hubbub_token *token, void *pw) /* Got a terminating EOF -- no error */ if (ctx->output_index >= array_list_length(ctx->output)) - return; + return HUBBUB_OK; /* Now increment the output index so we don't re-expect this token */ ctx->output_index++; @@ -483,4 +483,6 @@ void token_handler(const hubbub_token *token, void *pw) printf("\n"); break; } + + return HUBBUB_OK; } -- cgit v1.2.3