summaryrefslogtreecommitdiff
path: root/src/tokeniser
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-08-13 16:35:34 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-08-13 16:35:34 +0000
commit834c58d89c933493797a275e14038b4e7dbb7459 (patch)
tree2968c1d2219981028120d5c251e57e7e5b89f133 /src/tokeniser
parent8e108e1e513f8bcaeb90c22915afdac426e7782d (diff)
downloadlibhubbub-834c58d89c933493797a275e14038b4e7dbb7459.tar.gz
libhubbub-834c58d89c933493797a275e14038b4e7dbb7459.tar.bz2
Optimise COLLECT_MS() macro.
svn path=/trunk/hubbub/; revision=5099
Diffstat (limited to 'src/tokeniser')
-rw-r--r--src/tokeniser/tokeniser.c8
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)