]> git.sesse.net Git - vlc/commitdiff
Spare 236 relocations, mark data as constant.
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 23 Sep 2008 03:30:03 +0000 (06:30 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 23 Sep 2008 03:36:01 +0000 (06:36 +0300)
This saves 3 kbytes from stripped libvcccore here + speedup.
We can save another 1kbyte by removing the redumdant & and ; from the
table, but I am too lazy to update the algorithm accordingly.

src/text/strings.c

index ad2469b8e3a7b4a01031560edf28a0e6a72ff8df..ef67623b0ab32cb6ab43a3e9b7f41ef41b60fb8b 100644 (file)
@@ -237,11 +237,11 @@ char *encode_URI_component( const char *psz_url )
     return strdup( psz_enc );
 }
 
-static struct xml_entity_s
+static const struct xml_entity_s
 {
-    const char *psz_entity;
-    size_t i_length;
-    const char *psz_char;
+    char    psz_entity[9];
+    uint8_t i_length;
+    char    psz_char[4];
 } p_xml_entities[] = {
     /* Important: this list has to be in alphabetical order (psz_entity-wise) */
     { "&AElig;", 7, "Æ" },