summaryrefslogtreecommitdiff
path: root/src/parse/parse.h
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-27 12:14:07 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-27 12:14:07 +0000
commit7adaf92154adc7f3455769ca197f906e3d4cddaa (patch)
treeae172720c8e44a35b87b5506602768db19ec538f /src/parse/parse.h
parent79c0f3bc5c1581a6f2f6568a50e3b4f64b452541 (diff)
downloadlibcss-7adaf92154adc7f3455769ca197f906e3d4cddaa.tar.gz
libcss-7adaf92154adc7f3455769ca197f906e3d4cddaa.tar.bz2
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
Diffstat (limited to 'src/parse/parse.h')
-rw-r--r--src/parse/parse.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parse/parse.h b/src/parse/parse.h
index c2396cb..a948d56 100644
--- a/src/parse/parse.h
+++ b/src/parse/parse.h
@@ -8,6 +8,7 @@
#ifndef css_parse_parse_h_
#define css_parse_parse_h_
+#include <parserutils/utils/dict.h>
#include <parserutils/utils/vector.h>
#include <libcss/errors.h>
@@ -56,7 +57,8 @@ typedef union css_parser_optparams {
} css_parser_optparams;
css_error css_parser_create(const char *charset, css_charset_source cs_source,
- css_alloc alloc, void *pw, css_parser **parser);
+ parserutils_dict *dict, css_alloc alloc, void *pw,
+ css_parser **parser);
css_error css_parser_destroy(css_parser *parser);
css_error css_parser_setopt(css_parser *parser, css_parser_opttype type,