summaryrefslogtreecommitdiff
path: root/src/bytecode
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-12-01 16:46:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-12-01 16:46:45 +0000
commit01d8d19b1219d8d917050b2896002dddebb59431 (patch)
treea8fcab29070a6caff95e7cc9b3f10894fe768db5 /src/bytecode
parenta7229c649b98f1c5f5ea97c486b03dcc814c16ea (diff)
downloadlibcss-01d8d19b1219d8d917050b2896002dddebb59431.tar.gz
libcss-01d8d19b1219d8d917050b2896002dddebb59431.tar.bz2
The advantage of interning strings is that you don't have to store their length everywhere. Purge the length part from the encoding of a string in the bytecode.
Fix bytecode dump code to cope with this. svn path=/trunk/libcss/; revision=5864
Diffstat (limited to 'src/bytecode')
-rw-r--r--src/bytecode/dump.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/bytecode/dump.c b/src/bytecode/dump.c
index 05213ee..0cf54c8 100644
--- a/src/bytecode/dump.c
+++ b/src/bytecode/dump.c
@@ -166,14 +166,13 @@ void css_bytecode_dump(void *bytecode, uint32_t length, FILE *fp)
break;
case BACKGROUND_IMAGE_URI:
{
- uint8_t *ptr =
- *((uint8_t **) bytecode);
+ parserutils_hash_entry *ptr =
+ *((parserutils_hash_entry **)
+ bytecode);
ADVANCE(sizeof(ptr));
- size_t len =
- *((size_t *) bytecode);
- ADVANCE(sizeof(len));
- fprintf(fp, "url('%.*s')", (int) len,
- (char *) ptr);
+ fprintf(fp, "url('%.*s')",
+ (int) ptr->len,
+ (char *) ptr->data);
}
break;
}