From f3c6e30f43c8e9feec891d68cc3eee99c3ef6264 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 8 Nov 2008 23:20:42 +0000 Subject: Port hubbub to new lpu API svn path=/trunk/hubbub/; revision=5656 --- src/parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index 075a0e2..342f19b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -40,6 +40,7 @@ struct hubbub_parser { hubbub_parser *hubbub_parser_create(const char *enc, bool fix_enc, hubbub_alloc alloc, void *pw) { + parserutils_error perror; hubbub_parser *parser; if (alloc == NULL) @@ -62,10 +63,10 @@ hubbub_parser *hubbub_parser_create(const char *enc, bool fix_enc, } } - parser->stream = parserutils_inputstream_create(enc, + perror = parserutils_inputstream_create(enc, enc != NULL ? HUBBUB_CHARSET_CONFIDENT : HUBBUB_CHARSET_UNKNOWN, - hubbub_charset_extract, alloc, pw); - if (parser->stream == NULL) { + hubbub_charset_extract, alloc, pw, &parser->stream); + if (perror != PARSERUTILS_OK) { alloc(parser, 0, pw); return NULL; } -- cgit v1.2.3