diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-01 19:00:59 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-01 19:00:59 +0000 |
commit | 4680b309e825db1d669b04056bc3cbdf273f5d80 (patch) | |
tree | aee536560cde136c79aa57d043ab0a4e2294d509 /test | |
parent | 36ca9c1c76f92dd863a1f22ac9f66c07e775d45d (diff) | |
download | libcss-4680b309e825db1d669b04056bc3cbdf273f5d80.tar.gz libcss-4680b309e825db1d669b04056bc3cbdf273f5d80.tar.bz2 |
Only intern strings when we get a token from the lexer. Strings in tokens that have been pushed back have already been interned, so it's stupid to re-intern every time. This has required that the lexer permits its clients to modify the data members of the css_token object. That's fine, as it assumes nothing about them (they're basically just a window onto the internal lexer state, anyway).
svn path=/trunk/libcss/; revision=4857
Diffstat (limited to 'test')
-rw-r--r-- | test/lex-auto.c | 2 | ||||
-rw-r--r-- | test/lex.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/lex-auto.c b/test/lex-auto.c index b75fbb0..e148649 100644 --- a/test/lex-auto.c +++ b/test/lex-auto.c @@ -267,7 +267,7 @@ void run_test(const uint8_t *data, size_t len, exp_entry *exp, size_t explen) parserutils_inputstream *input; css_lexer *lexer; css_error error; - const css_token *tok; + css_token *tok; size_t e; static int testnum; @@ -108,7 +108,7 @@ int main(int argc, char **argv) size_t len, origlen; #define CHUNK_SIZE (4096) uint8_t buf[CHUNK_SIZE]; - const css_token *tok; + css_token *tok; css_error error; if (argc != 3) { |