[vlc-devel] commit: Spare 236 relocations, mark data as constant. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Sep 23 05:33:16 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Tue Sep 23 06:30:03 2008 +0300| [c9b87bed7fffea72a49300fc41506403dde1538c] | committer: Rémi Denis-Courmont
Spare 236 relocations, mark data as constant.
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.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c9b87bed7fffea72a49300fc41506403dde1538c
---
src/text/strings.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/text/strings.c b/src/text/strings.c
index ad2469b..ef67623 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -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) */
{ "Æ", 7, "Æ" },
More information about the vlc-devel
mailing list