diff options
author | Andrew Sidwell <andy@entai.co.uk> | 2008-08-13 16:35:34 +0000 |
---|---|---|
committer | Andrew Sidwell <andy@entai.co.uk> | 2008-08-13 16:35:34 +0000 |
commit | 834c58d89c933493797a275e14038b4e7dbb7459 (patch) | |
tree | 2968c1d2219981028120d5c251e57e7e5b89f133 /src | |
parent | 8e108e1e513f8bcaeb90c22915afdac426e7782d (diff) | |
download | libhubbub-834c58d89c933493797a275e14038b4e7dbb7459.tar.gz libhubbub-834c58d89c933493797a275e14038b4e7dbb7459.tar.bz2 |
Optimise COLLECT_MS() macro.
svn path=/trunk/hubbub/; revision=5099
Diffstat (limited to 'src')
-rw-r--r-- | src/tokeniser/tokeniser.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tokeniser/tokeniser.c b/src/tokeniser/tokeniser.c index 1fdaddb..3d07194 100644 --- a/src/tokeniser/tokeniser.c +++ b/src/tokeniser/tokeniser.c @@ -596,11 +596,9 @@ hubbub_error hubbub_tokeniser_run(hubbub_tokeniser *tokeniser) #define COLLECT_MS(str, cptr, length) \ do { \ - if ((str).len == 0) { \ - START_BUF(str, (uint8_t *)cptr, length); \ - } else { \ - COLLECT(str, cptr, length); \ - } \ + parserutils_buffer_append(tokeniser->buffer, \ + (uint8_t *) cptr, (length)); \ + (str).len += (length); \ } while (0) |