From: Nuno Lopes Date: Fri, 15 Sep 2006 15:11:54 +0000 (+0000) Subject: mark some huge arrays as read-only X-Git-Tag: php-5.2.0RC5~159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fe9d3b16c53988ba8055d10ede8fef4473da9f80;p=php mark some huge arrays as read-only --- diff --git a/ext/gd/libgd/gd.h b/ext/gd/libgd/gd.h index 751a1e74e8..dcb3cf3c76 100644 --- a/ext/gd/libgd/gd.h +++ b/ext/gd/libgd/gd.h @@ -193,7 +193,7 @@ typedef struct { /* Font data; array of characters, one row after another. Easily included in code, also easily loaded from data files. */ - char *data; + const char *data; } gdFont; /* Text functions take these. */ diff --git a/ext/gd/libgd/gdfontg.c b/ext/gd/libgd/gdfontg.c index 61c8c2710e..e18b596429 100644 --- a/ext/gd/libgd/gdfontg.c +++ b/ext/gd/libgd/gdfontg.c @@ -13,7 +13,7 @@ #include "gdfontg.h" -char gdFontGiantData[] = +static const char gdFontGiantData[] = { /* Char 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/ext/gd/libgd/gdfontl.c b/ext/gd/libgd/gdfontl.c index 6da54e1a12..47dbb09668 100644 --- a/ext/gd/libgd/gdfontl.c +++ b/ext/gd/libgd/gdfontl.c @@ -14,7 +14,7 @@ #include "gdfontl.h" -char gdFontLargeData[] = +static const char gdFontLargeData[] = { /* Char 0 */ 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/ext/gd/libgd/gdfontmb.c b/ext/gd/libgd/gdfontmb.c index dab7c0589d..a959193652 100644 --- a/ext/gd/libgd/gdfontmb.c +++ b/ext/gd/libgd/gdfontmb.c @@ -12,7 +12,7 @@ #include "gdfontmb.h" -char gdFontMediumBoldData[] = +static const char gdFontMediumBoldData[] = { /* Char 0 */ 0, 0, 0, 0, 0, 0, 0, diff --git a/ext/gd/libgd/gdfonts.c b/ext/gd/libgd/gdfonts.c index 165cf70c54..5d7ebcf19b 100644 --- a/ext/gd/libgd/gdfonts.c +++ b/ext/gd/libgd/gdfonts.c @@ -12,7 +12,7 @@ #include "gdfonts.h" -char gdFontSmallData[] = +static const char gdFontSmallData[] = { /* Char 0 */ 0, 0, 0, 0, 0, 0, diff --git a/ext/gd/libgd/gdfontt.c b/ext/gd/libgd/gdfontt.c index 2e6d241506..9e703b1497 100644 --- a/ext/gd/libgd/gdfontt.c +++ b/ext/gd/libgd/gdfontt.c @@ -13,7 +13,7 @@ #include "gdfontt.h" -char gdFontTinyData[] = +static const char gdFontTinyData[] = { /* Char 0 */ 0, 0, 0, 0, 0, diff --git a/ext/gd/libgd/gdtables.c b/ext/gd/libgd/gdtables.c index 1e81f3e9ee..e34d8fc7cb 100644 --- a/ext/gd/libgd/gdtables.c +++ b/ext/gd/libgd/gdtables.c @@ -5,7 +5,7 @@ #include "php_compat.h" -int gdCosT[] = +const int gdCosT[] = { 1024, 1023, @@ -369,7 +369,7 @@ int gdCosT[] = 1023 }; -int gdSinT[] = +const int gdSinT[] = { 0, 17,