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:
parent
26437d4924
commit
e85789a997
|
@ -377,7 +377,7 @@ main (int argc, char **argv)
|
||||||
if (j < 0)
|
if (j < 0)
|
||||||
j = i;
|
j = i;
|
||||||
|
|
||||||
printf (" { (FcChar8 *) \"%s\", "
|
printf (" { \"%s\", "
|
||||||
" { FC_REF_CONSTANT, %d, OFF(%d,%d), NUM(%d,%d) } }, /* %d */\n",
|
" { FC_REF_CONSTANT, %d, OFF(%d,%d), NUM(%d,%d) } }, /* %d */\n",
|
||||||
langs[i],
|
langs[i],
|
||||||
sets[j]->num, i, off[j], i, off[j], i);
|
sets[j]->num, i, off[j], i, off[j], i);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#include "fcint.h"
|
#include "fcint.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const FcChar8 *lang;
|
const FcChar8 lang[8];
|
||||||
const FcCharSet charset;
|
const FcCharSet charset;
|
||||||
} FcLangCharSet;
|
} FcLangCharSet;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue