summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-10-06 19:16:37 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2011-10-06 19:16:37 (GMT)
commite5913135a86509fac8d16e7c4993fd10357a663e (patch)
tree65892d9a6e7aa34944bdc598d31a2244b6077916
parente0f1048bbeb7dfff28d32edba4a7944a411f6299 (diff)
downloadlibcss-e5913135a86509fac8d16e7c4993fd10357a663e.tar.gz
libcss-e5913135a86509fac8d16e7c4993fd10357a663e.tar.bz2
Tidy up
svn path=/trunk/libcss/; revision=12973
-rw-r--r--src/parse/language.c1
-rw-r--r--src/parse/language.h1
-rw-r--r--src/parse/propstrings.c11
-rw-r--r--src/parse/propstrings.h7
4 files changed, 7 insertions, 13 deletions
diff --git a/src/parse/language.c b/src/parse/language.c
index f541514..b3da6b7 100644
--- a/src/parse/language.c
+++ b/src/parse/language.c
@@ -138,7 +138,6 @@ css_error css__language_create(css_stylesheet *sheet, css_parser *parser,
return css_error_from_parserutils_error(perror);
}
- /* Intern all known strings */
error = css__propstrings_get(&c->strings);
if (error != CSS_OK) {
parserutils_stack_destroy(c->context);
diff --git a/src/parse/language.h b/src/parse/language.h
index 522e981..efbfaa1 100644
--- a/src/parse/language.h
+++ b/src/parse/language.h
@@ -42,7 +42,6 @@ typedef struct css_language {
HAD_RULE
} state; /**< State flag, for at-rule handling */
- /** \todo These should be statically allocated */
/** Interned strings */
lwc_string **strings;
diff --git a/src/parse/propstrings.c b/src/parse/propstrings.c
index 6973a54..bf1fcd0 100644
--- a/src/parse/propstrings.c
+++ b/src/parse/propstrings.c
@@ -10,14 +10,17 @@
#include <assert.h>
+typedef struct stringmap_entry {
+ const char *data;
+ size_t len;
+} stringmap_entry;
+
typedef struct css__propstrings_ctx {
uint32_t count;
lwc_string *strings[LAST_KNOWN];
-} css__propstings_ctx;
+} css__propstrings_ctx;
-css__propstings_ctx css__propstrings = {
- .count = 0
-};
+static css__propstrings_ctx css__propstrings;
/* Must be synchronised with enum in propstrings.h */
const stringmap_entry stringmap[LAST_KNOWN] = {
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
index 9ae3cf3..7c7b693 100644
--- a/src/parse/propstrings.h
+++ b/src/parse/propstrings.h
@@ -124,13 +124,6 @@ enum {
LAST_KNOWN
};
-typedef struct stringmap_entry {
- const char *data;
- size_t len;
-} stringmap_entry;
-
-extern const stringmap_entry stringmap[LAST_KNOWN];
-
css_error css__propstrings_get(lwc_string ***strings);
void css__propstrings_unref(void);