Add consts to variables so as to move arrays into .rodata.

reviewed by: plam
This commit is contained in:
Patrick Lam 2005-10-14 21:02:31 +00:00
parent 15d7bd0a16
commit 21696e5bf0
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2005-10-14 Ross Burton <ross@burtonini.com>
reviewed by: plam
* fc-glyphname/fc-glyphname.c:
* src/fclang.c:
Add consts to variables so as to move arrays into .rodata.
2005-10-14 Mike Fabian <mfabian@suse.de>
reviewed by: plam

View File

@ -219,7 +219,7 @@ dump (FcGlyphName * const *table, const char *name)
{
int i;
printf ("static FcGlyphName *%s[%d] = {\n", name, hash);
printf ("static const FcGlyphName *%s[%d] = {\n", name, hash);
for (i = 0; i < hash; i++)
if (table[i])
@ -289,7 +289,7 @@ main (int argc, char **argv)
*/
for (i = 0; i < nraw; i++)
printf ("static struct { FcChar32 ucs; FcChar8 name[%d]; }"
printf ("static const struct { const FcChar32 ucs; const FcChar8 name[%d]; }"
" glyph%d = { 0x%lx, \"%s\" };\n",
(int) strlen ((char *) raw[i]->name) + 1,
i, (unsigned long) raw[i]->ucs, raw[i]->name);

View File

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