diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-09 17:40:40 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-11-09 17:40:40 +0000 |
commit | 9c6e96d743c993f1b92f0cc2f07164d44780536e (patch) | |
tree | 9067578eeb652fd998ddc5462b7ff8c7fb8abd57 /src/parser.c | |
parent | 6c0e77c643e96436d85aebb9195c83cb403c25fa (diff) | |
download | libhubbub-9c6e96d743c993f1b92f0cc2f07164d44780536e.tar.gz libhubbub-9c6e96d743c993f1b92f0cc2f07164d44780536e.tar.bz2 |
Return errors from tokeniser constructor/destructor
svn path=/trunk/hubbub/; revision=5664
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parser.c b/src/parser.c index 342f19b..b67e9d1 100644 --- a/src/parser.c +++ b/src/parser.c @@ -41,6 +41,7 @@ hubbub_parser *hubbub_parser_create(const char *enc, bool fix_enc, hubbub_alloc alloc, void *pw) { parserutils_error perror; + hubbub_error error; hubbub_parser *parser; if (alloc == NULL) @@ -71,11 +72,12 @@ hubbub_parser *hubbub_parser_create(const char *enc, bool fix_enc, return NULL; } - parser->tok = hubbub_tokeniser_create(parser->stream, alloc, pw); - if (parser->tok == NULL) { + error = hubbub_tokeniser_create(parser->stream, alloc, pw, + &parser->tok); + if (error != HUBBUB_OK) { parserutils_inputstream_destroy(parser->stream); alloc(parser, 0, pw); - return NULL; + return NULL; /// } parser->tb = hubbub_treebuilder_create(parser->tok, alloc, pw); |