From 3a03e4be1a744d37c66ea97651ca082ee4eb39d4 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 1 Dec 2008 03:23:25 +0000 Subject: Divorce css_string from whatever gets stored in lpu hashes. Use pointers to parserutils_hash_entry directly in stylesheet datastructures. The upshot of this for allzengarden.css is: 5506 slots used (of 8192 => 67.211914%) Data: 8 full blocks: 32768 bytes 9 partial blocks: 35124 bytes (of 36864 => 95.279945%) Total: 69936 (4112) (32) Hash structures: 65584 i.e. a total string dictionary size of 135,520 bytes, which is some 74,056 bytes less than before. svn path=/trunk/libcss/; revision=5859 --- src/parse/parse.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/parse') diff --git a/src/parse/parse.c b/src/parse/parse.c index 54b37d8..ff8c813 100644 --- a/src/parse/parse.c +++ b/src/parse/parse.c @@ -639,7 +639,8 @@ css_error getToken(css_parser *parser, const css_token **token) perror); } - t->lower.data = interned->data; + t->lower.data = + (uint8_t *) interned->data; t->lower.len = interned->len; } } @@ -650,14 +651,14 @@ css_error getToken(css_parser *parser, const css_token **token) &interned); if (t->lower.data == NULL) { - t->lower.data = interned->data; + t->lower.data = (uint8_t *) interned->data; t->lower.len = interned->len; } if (perror != PARSERUTILS_OK) return css_error_from_parserutils_error(perror); - t->data.data = interned->data; + t->data.data = (uint8_t *) interned->data; t->data.len = interned->len; } else { t->data.data = t->lower.data = NULL; -- cgit v1.2.3