Skip to content

Commit 4ef8bdf

Browse files
committed
PERL_GLOBAL_STRUCT_PRIVATE: fix some const strings
change a couple of const char * foo[] = { ... } to const char * const foo[] = { ... } Making the string ptrs const means the whole thing is RO and doesn't appear in data section, making porting/libperl.t happier when building under -DPERL_GLOBAL_STRUCT_PRIVATE.
1 parent 3680775 commit 4ef8bdf

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

charclass_invlists.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -182193,7 +182193,7 @@ static const UV UNI__PERL_PROBLEMATIC_LOCALE_FOLDEDS_START_invlist[] = { /* for
182193182193
0x0,
182194182194
0x100,
182195182195
0x130,
182196-
0x132,
182196+
0x131,
182197182197
0x149,
182198182198
0x14A,
182199182199
0x178,
@@ -182219,14 +182219,14 @@ static const UV UNI__PERL_PROBLEMATIC_LOCALE_FOLDEDS_START_invlist[] = { /* for
182219182219
};
182220182220

182221182221
static const UV UNI__PERL_PROBLEMATIC_LOCALE_FOLDS_invlist[] = { /* for all charsets */
182222-
26, /* Number of elements */
182222+
24, /* Number of elements */
182223182223
148565664, /* Version and data structure type */
182224182224
0, /* 0 if the list starts at 0;
182225182225
1 if it starts at the element beyond 0 */
182226182226
0x0,
182227182227
0x100,
182228182228
0x130,
182229-
0x132,
182229+
0x131,
182230182230
0x149,
182231182231
0x14A,
182232182232
0x178,
@@ -182235,8 +182235,6 @@ static const UV UNI__PERL_PROBLEMATIC_LOCALE_FOLDS_invlist[] = { /* for all cha
182235182235
0x180,
182236182236
0x1F0,
182237182237
0x1F1,
182238-
0x307,
182239-
0x308,
182240182238
0x39C,
182241182239
0x39D,
182242182240
0x3BC,
@@ -381512,7 +381510,7 @@ static const UV UNI__PERL_SURROGATE_invlist[] = { /* for all charsets */
381512381510
0xE000
381513381511
};
381514381512

381515-
const char * deprecated_property_msgs[] = {
381513+
const char * const deprecated_property_msgs[] = {
381516381514
"",
381517381515
"Surrogates should never appear in well-formed text, and therefore shouldn't be the basis for line breaking",
381518381516
"Supplanted by Line_Break property values; see www.unicode.org/reports/tr14"
@@ -384050,5 +384048,5 @@ static const U8 WB_table[23][23] = {
384050384048
* 7bd6bcbe3813e0cd55e0998053d182b7bc8c97dcfd0b85028e9f7f55af4ad61b lib/unicore/version
384051384049
* 4bb677187a1a64e39d48f2e341b5ecb6c99857e49d7a79cf503bd8a3c709999b regen/charset_translations.pl
384052384050
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
384053-
* 8ae37f2b5bbc7d215f63e8d1189754d83a16c6156fd353847f6fcced90c513d5 regen/mk_invlists.pl
384051+
* 2fb19108265d37fc38920cd3f775c5c9fc25ae8b95be3bf197f47da1dc4989f4 regen/mk_invlists.pl
384054384052
* ex: set ro: */

locale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ const int categories[] = {
207207

208208
/* The top-most real element is LC_ALL */
209209

210-
const char * category_names[] = {
210+
const char * const category_names[] = {
211211

212212
# ifdef USE_LOCALE_NUMERIC
213213
"LC_NUMERIC",

regen/mk_invlists.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2911,7 +2911,7 @@ ($)
29112911

29122912
switch_pound_if ('binary_property_tables', 'PERL_IN_REGCOMP_C');
29132913

2914-
print $out_fh "\nconst char * deprecated_property_msgs[] = {\n\t";
2914+
print $out_fh "\nconst char * const deprecated_property_msgs[] = {\n\t";
29152915
print $out_fh join ",\n\t", map { "\"$_\"" } @deprecated_messages;
29162916
print $out_fh "\n};\n";
29172917

uni_keywords.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6996,6 +6996,6 @@ MPH_VALt match_uniprop( const unsigned char * const key, const U16 key_len ) {
69966996
* 7bd6bcbe3813e0cd55e0998053d182b7bc8c97dcfd0b85028e9f7f55af4ad61b lib/unicore/version
69976997
* 4bb677187a1a64e39d48f2e341b5ecb6c99857e49d7a79cf503bd8a3c709999b regen/charset_translations.pl
69986998
* 03e51b0f07beebd5da62ab943899aa4934eee1f792fa27c1fb638c33bf4ac6ea regen/mk_PL_charclass.pl
6999-
* 8ae37f2b5bbc7d215f63e8d1189754d83a16c6156fd353847f6fcced90c513d5 regen/mk_invlists.pl
6999+
* 2fb19108265d37fc38920cd3f775c5c9fc25ae8b95be3bf197f47da1dc4989f4 regen/mk_invlists.pl
70007000
* c56b78df81e0f96632246052d71580b212546ca02ba4075158965e11d892f21e regen/mph.pl
70017001
* ex: set ro: */

0 commit comments

Comments
 (0)