From 01d8d19b1219d8d917050b2896002dddebb59431 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 1 Dec 2008 16:46:45 +0000 Subject: 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 --- src/bytecode/dump.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/bytecode') 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; } -- cgit v1.2.3