1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-07 16:59:36 +03:00

Add const in five places to move 1 KiB to .rdata

xmlUnicodeBlocks is logically const but was not marked as such. This
fixes that, thus moving it to the read-only data segment.
This commit is contained in:
Bruce Dawson
2017-08-28 21:27:03 +02:00
committed by Daniel Veillard
parent 3daee3f159
commit 8f57103793
2 changed files with 5 additions and 5 deletions

View File

@ -267,14 +267,14 @@ typedef struct {
} xmlUnicodeRange; } xmlUnicodeRange;
typedef struct { typedef struct {
xmlUnicodeRange *table; const xmlUnicodeRange *table;
int numentries; int numentries;
} xmlUnicodeNameTable; } xmlUnicodeNameTable;
static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname); static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname);
static xmlUnicodeRange xmlUnicodeBlocks[] = { static const xmlUnicodeRange xmlUnicodeBlocks[] = {
""" % (webpage, date, sources)); """ % (webpage, date, sources));
flag = 0 flag = 0

View File

@ -29,14 +29,14 @@ typedef struct {
} xmlUnicodeRange; } xmlUnicodeRange;
typedef struct { typedef struct {
xmlUnicodeRange *table; const xmlUnicodeRange *table;
int numentries; int numentries;
} xmlUnicodeNameTable; } xmlUnicodeNameTable;
static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname); static xmlIntFunc *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname);
static xmlUnicodeRange xmlUnicodeBlocks[] = { static const xmlUnicodeRange xmlUnicodeBlocks[] = {
{"AegeanNumbers", xmlUCSIsAegeanNumbers}, {"AegeanNumbers", xmlUCSIsAegeanNumbers},
{"AlphabeticPresentationForms", xmlUCSIsAlphabeticPresentationForms}, {"AlphabeticPresentationForms", xmlUCSIsAlphabeticPresentationForms},
{"Arabic", xmlUCSIsArabic}, {"Arabic", xmlUCSIsArabic},
@ -945,7 +945,7 @@ static xmlUnicodeNameTable xmlUnicodeCatTbl = {xmlUnicodeCats, 36};
static xmlIntFunc static xmlIntFunc
*xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) { *xmlUnicodeLookup(xmlUnicodeNameTable *tptr, const char *tname) {
int low, high, mid, cmp; int low, high, mid, cmp;
xmlUnicodeRange *sptr; const xmlUnicodeRange *sptr;
if ((tptr == NULL) || (tname == NULL)) return(NULL); if ((tptr == NULL) || (tname == NULL)) return(NULL);