diff options
author | John-Mark Bell <jmb@netsurf-browser.org> | 2012-07-05 21:21:14 +0100 |
---|---|---|
committer | John-Mark Bell <jmb@netsurf-browser.org> | 2012-07-05 21:21:14 +0100 |
commit | b20ec087e0c528a1b9a76b7887023d6da50bac47 (patch) | |
tree | 766726549f9982535f9b5de0ab0b917b9aab76bb /src/parser.c | |
parent | d8dec9ad2c21a6bb08c49e6ae7e5b0f01867f982 (diff) | |
download | libhubbub-b20ec087e0c528a1b9a76b7887023d6da50bac47.tar.gz libhubbub-b20ec087e0c528a1b9a76b7887023d6da50bac47.tar.bz2 |
Insert data at correct point in input stream.
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/parser.c b/src/parser.c index 95216a3..bf6cca4 100644 --- a/src/parser.c +++ b/src/parser.c @@ -207,23 +207,17 @@ hubbub_error hubbub_parser_setopt(hubbub_parser *parser, * useful to allow hubbub callbacks to add computed data to the input. * * \param parser Parser instance to use - * \param data Data to parse (encoded in the input charset) + * \param data Data to parse (encoded in UTF-8) * \param len Length, in bytes, of data * \return HUBBUB_OK on success, appropriate error otherwise */ hubbub_error hubbub_parser_insert_chunk(hubbub_parser *parser, const uint8_t *data, size_t len) { - parserutils_error perror; - if (parser == NULL || data == NULL) return HUBBUB_BADPARM; - perror = parserutils_inputstream_insert(parser->stream, data, len); - if (perror != PARSERUTILS_OK) - return hubbub_error_from_parserutils_error(perror); - - return HUBBUB_OK; + return hubbub_tokeniser_insert_chunk(parser->tok, data, len); } /** |