Place language name in constant array instead of pointer.

Constant char array of 8 bytes is the same size as a pointer plus a short
string, so this actually saves memory and eliminates a pile of relocations.
This commit is contained in:
Keith Packard 2007-10-18 08:58:14 -07:00
parent 26437d4924
commit e85789a997
2 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ main (int argc, char **argv)
if (j < 0)
j = i;
printf (" { (FcChar8 *) \"%s\", "
printf (" { \"%s\", "
" { FC_REF_CONSTANT, %d, OFF(%d,%d), NUM(%d,%d) } }, /* %d */\n",
langs[i],
sets[j]->num, i, off[j], i, off[j], i);

View File

@ -25,7 +25,7 @@
#include "fcint.h"
typedef struct {
const FcChar8 *lang;
const FcChar8 lang[8];
const FcCharSet charset;
} FcLangCharSet;