From 7adaf92154adc7f3455769ca197f906e3d4cddaa Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 27 Nov 2008 12:14:07 +0000 Subject: css_string is now the same as a parserutils_dict_entry. This allows us to use dict entries directly as strings. iChange the way in which selectors are represented. This significantly reduces memory requirements -- reducing the approximate usage count (excludes the string dictionary, which is about 360k) of allzengarden.css from 4,535,400 bytes to 2,414,312 bytes on a 64bit platform. The string dictionary is now created and owned by the stylesheet object. The parser is just given access to this so that it can store strings in it. svn path=/trunk/libcss/; revision=5809 --- src/utils/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/utils/utils.h') diff --git a/src/utils/utils.h b/src/utils/utils.h index 333a33f..a8848e3 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -43,7 +43,7 @@ static inline fixed number_from_css_string(const css_string *string, return 0; len = string->len; - ptr = string->ptr; + ptr = string->data; /* number = [+-]? ([0-9]+ | [0-9]* '.' [0-9]+) */ @@ -119,7 +119,7 @@ static inline fixed number_from_css_string(const css_string *string, intpart = (1 << 21) - 1; } - *consumed = ptr - string->ptr; + *consumed = ptr - string->data; return FMULI(((intpart << 10) | fracpart), sign); } -- cgit v1.2.3