Skip to content

Commit 86142b3

Browse files
committed
Convert leading underscore to trailing in internal global macro
Leading underscores of global names are reserved for the C implmentation itself. We are gradually fixing ours to conform.
1 parent 8a872a1 commit 86142b3

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

perl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7545,7 +7545,7 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
75457545
* and will do so if enabled. The first takes a single code point
75467546
* argument; the 2nd, is a pointer to the first byte of the UTF-8 encoded
75477547
* string, and an end position which it won't try to read past */
7548-
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(cp) \
7548+
# define CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG_(cp) \
75497549
STMT_START { \
75507550
if (! IN_UTF8_CTYPE_LOCALE && ckWARN(WARN_LOCALE)) { \
75517551
Perl_warner(aTHX_ packWARN(WARN_LOCALE), \
@@ -7554,7 +7554,7 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
75547554
} \
75557555
} STMT_END
75567556

7557-
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) \
7557+
# define CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(s, send) \
75587558
STMT_START { /* Check if to warn before doing the conversion work */\
75597559
if (! IN_UTF8_CTYPE_LOCALE && ckWARN(WARN_LOCALE)) { \
75607560
UV cp; \
@@ -7581,8 +7581,8 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
75817581
# define IN_LC_RUNTIME(category) 0
75827582
# define IN_LC(category) 0
75837583
# define CHECK_AND_WARN_PROBLEMATIC_LOCALE_
7584-
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send)
7585-
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c)
7584+
# define CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(s, send)
7585+
# define CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG_(c)
75867586
#endif
75877587

75887588
#define locale_panic_via_(m, f, l) Perl_locale_panic((m), __LINE__, f, l)

regexec.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character, const U8* e)
607607
EIGHT_BIT_UTF8_TO_NATIVE(*character, *(character + 1)));
608608
}
609609

610-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(character, e);
610+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(character, e);
611611

612612
switch ((char_class_number_) classnum) {
613613
case CC_ENUM_SPACE_: return is_XPERLSPACE_high(character);
@@ -1807,7 +1807,7 @@ STMT_START {
18071807
case trie_flu8: \
18081808
CHECK_AND_WARN_PROBLEMATIC_LOCALE_; \
18091809
if (UTF8_IS_ABOVE_LATIN1(*uc)) { \
1810-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end); \
1810+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(uc, uc_end); \
18111811
} \
18121812
goto do_trie_utf8_fold; \
18131813
case trie_utf8_exactfa_fold: \
@@ -1853,7 +1853,7 @@ STMT_START {
18531853
case trie_utf8l: \
18541854
CHECK_AND_WARN_PROBLEMATIC_LOCALE_; \
18551855
if (utf8_target && UTF8_IS_ABOVE_LATIN1(*uc)) { \
1856-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(uc, uc_end); \
1856+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(uc, uc_end); \
18571857
} \
18581858
/* FALLTHROUGH */ \
18591859
case trie_utf8: \
@@ -6730,7 +6730,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
67306730
/* We only output for EXACTL, as we let the folder
67316731
* output this message for EXACTFLU8 to avoid
67326732
* duplication */
6733-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(locinput,
6733+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(locinput,
67346734
reginfo->strend);
67356735
}
67366736
}
@@ -7054,7 +7054,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
70547054
* just to check for this warning is worth it. So this just checks
70557055
* the first character */
70567056
if (utf8_target && UTF8_IS_ABOVE_LATIN1(*locinput)) {
7057-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(locinput, reginfo->strend);
7057+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(locinput, reginfo->strend);
70587058
}
70597059
goto do_exact;
70607060
case EXACT_REQ8:
@@ -7740,7 +7740,7 @@ S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode *prog)
77407740

77417741
if (! UTF8_IS_NEXT_CHAR_DOWNGRADEABLE(locinput, reginfo->strend)) {
77427742
/* An above Latin-1 code point, or malformed */
7743-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(locinput,
7743+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(locinput,
77447744
reginfo->strend);
77457745
goto utf8_posix_above_latin1;
77467746
}
@@ -10305,7 +10305,7 @@ S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p,
1030510305

1030610306
case EXACTL_t8:
1030710307
if (UTF8_IS_ABOVE_LATIN1(*scan)) {
10308-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(scan, loceol);
10308+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(scan, loceol);
1030910309
}
1031010310
/* FALLTHROUGH */
1031110311

@@ -10926,7 +10926,7 @@ S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8* const
1092610926
&& (OP(n) == ANYOFL || OP(n) == ANYOFPOSIXL)
1092710927
&& ! (flags & ANYOFL_UTF8_LOCALE_REQD))
1092810928
{
10929-
_CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG(c);
10929+
CHECK_AND_OUTPUT_WIDE_LOCALE_CP_MSG_(c);
1093010930
}
1093110931
}
1093210932

utf8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4152,7 +4152,7 @@ S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result,
41524152
}
41534153

41544154
/* Here, no characters crossed, result is ok as-is, but we warn. */
4155-
_CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(p, p + UTF8SKIP(p));
4155+
CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG_(p, p + UTF8SKIP(p));
41564156
return result;
41574157
}
41584158

0 commit comments

Comments
 (0)