Skip to content

Commit 476f5af

Browse files
committed
Convert leading underscore to trailing.
Leading underscores of global names are reserved for the C implmentation itself. We are gradually fixing ours to conform.
1 parent 1cd1334 commit 476f5af

File tree

9 files changed

+28
-28
lines changed

9 files changed

+28
-28
lines changed

doop.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ S_do_trans_count_invmap(pTHX_ SV * const sv, AV * const invmap)
373373
else {
374374
from = utf8_to_uvchr_buf(s, send, &s_len);
375375
if (from == 0 && *s != '\0') {
376-
_force_out_malformed_utf8_message(s, send, 0, MALFORMED_UTF8_DIE);
376+
force_out_malformed_utf8_message_(s, send, 0, MALFORMED_UTF8_DIE);
377377
}
378378
}
379379

@@ -492,7 +492,7 @@ S_do_trans_invmap(pTHX_ SV * const sv, AV * const invmap)
492492
else {
493493
from = utf8_to_uvchr_buf(s, send, &s_len);
494494
if (from == 0 && *s != '\0') {
495-
_force_out_malformed_utf8_message(s, send, 0, MALFORMED_UTF8_DIE);
495+
force_out_malformed_utf8_message_(s, send, 0, MALFORMED_UTF8_DIE);
496496
}
497497
}
498498

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ Adpx |void |forbid_outofblock_ops \
12381238
|NN OP *o \
12391239
|NN const char *blockname
12401240
p |void |force_locale_unlock
1241-
Cp |void |_force_out_malformed_utf8_message \
1241+
Cp |void |force_out_malformed_utf8_message_ \
12421242
|NN const U8 * const p \
12431243
|NN const U8 * const e \
12441244
|const U32 flags \

embed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@
113113
# define SvTRUE_nomg(a) Perl_SvTRUE_nomg(aTHX_ a)
114114
# define SvUV(a) Perl_SvUV(aTHX_ a)
115115
# define SvUV_nomg(a) Perl_SvUV_nomg(aTHX_ a)
116-
# define _force_out_malformed_utf8_message(a,b,c,d) Perl__force_out_malformed_utf8_message(aTHX_ a,b,c,d)
117116
# define _is_uni_FOO(a,b) Perl__is_uni_FOO(aTHX_ a,b)
118117
# define _is_uni_perl_idcont(a) Perl__is_uni_perl_idcont(aTHX_ a)
119118
# define _is_uni_perl_idstart(a) Perl__is_uni_perl_idstart(aTHX_ a)
@@ -236,6 +235,7 @@
236235
# define foldEQ_locale(a,b,c) Perl_foldEQ_locale(aTHX_ a,b,c)
237236
# define foldEQ_utf8_flags(a,b,c,d,e,f,g,h,i) Perl_foldEQ_utf8_flags(aTHX_ a,b,c,d,e,f,g,h,i)
238237
# define forbid_outofblock_ops(a,b) Perl_forbid_outofblock_ops(aTHX_ a,b)
238+
# define force_out_malformed_utf8_message_(a,b,c,d) Perl_force_out_malformed_utf8_message_(aTHX_ a,b,c,d)
239239
# define free_tmps() Perl_free_tmps(aTHX)
240240
# define get_av(a,b) Perl_get_av(aTHX_ a,b)
241241
# define get_cv(a,b) Perl_get_cv(aTHX_ a,b)

handy.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2272,14 +2272,14 @@ END_EXTERN_C
22722272

22732273
#define generic_utf8_safe_(classnum, p, e, above_latin1) \
22742274
((! _utf8_safe_assert(p, e)) \
2275-
? (_force_out_malformed_utf8_message((U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0)\
2275+
? (force_out_malformed_utf8_message_((U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0)\
22762276
: (UTF8_IS_INVARIANT(*(p))) \
22772277
? generic_isCC_(*(p), classnum) \
22782278
: (UTF8_IS_DOWNGRADEABLE_START(*(p)) \
22792279
? ((LIKELY((e) - (p) > 1 && UTF8_IS_CONTINUATION(*((p)+1)))) \
22802280
? generic_isCC_(EIGHT_BIT_UTF8_TO_NATIVE(*(p), *((p)+1 )), \
22812281
classnum) \
2282-
: (_force_out_malformed_utf8_message( \
2282+
: (force_out_malformed_utf8_message_( \
22832283
(U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0)) \
22842284
: above_latin1))
22852285
/* Like the above, but calls 'above_latin1(p)' to get the utf8 value.
@@ -2289,7 +2289,7 @@ END_EXTERN_C
22892289
#define generic_non_invlist_utf8_safe_(classnum, above_latin1, p, e) \
22902290
generic_utf8_safe_(classnum, p, e, \
22912291
(UNLIKELY((e) - (p) < UTF8SKIP(p)) \
2292-
? (_force_out_malformed_utf8_message( \
2292+
? (force_out_malformed_utf8_message_( \
22932293
(U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0) \
22942294
: above_latin1(p)))
22952295
/* Like the above, but passes classnum to _isFOO_utf8(), instead of having an
@@ -2379,7 +2379,7 @@ END_EXTERN_C
23792379
#define isXDIGIT_utf8_safe(p, e) \
23802380
generic_utf8_safe_no_upper_latin1_(CC_XDIGIT_, p, e, \
23812381
(UNLIKELY((e) - (p) < UTF8SKIP(p)) \
2382-
? (_force_out_malformed_utf8_message( \
2382+
? (force_out_malformed_utf8_message_( \
23832383
(U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0) \
23842384
: is_XDIGIT_high(p)))
23852385

@@ -2428,7 +2428,7 @@ END_EXTERN_C
24282428
: (UTF8_IS_DOWNGRADEABLE_START(*(p)) \
24292429
? ((LIKELY((e) - (p) > 1 && UTF8_IS_CONTINUATION(*((p)+1)))) \
24302430
? macro(EIGHT_BIT_UTF8_TO_NATIVE(*(p), *((p)+1))) \
2431-
: (_force_out_malformed_utf8_message( \
2431+
: (force_out_malformed_utf8_message_( \
24322432
(U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0)) \
24332433
: above_latin1))
24342434

@@ -2442,7 +2442,7 @@ END_EXTERN_C
24422442
#define generic_LC_non_invlist_utf8_safe_(classnum, above_latin1, p, e) \
24432443
generic_LC_utf8_safe_(classnum, p, e, \
24442444
(UNLIKELY((e) - (p) < UTF8SKIP(p)) \
2445-
? (_force_out_malformed_utf8_message( \
2445+
? (force_out_malformed_utf8_message_( \
24462446
(U8 *) (p), (U8 *) (e), 0, MALFORMED_UTF8_DIE), 0) \
24472447
: above_latin1(p)))
24482448

pp_pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3152,7 +3152,7 @@ PP_wrapped(pp_pack, 0, 1)
31523152
const U8 * error_pos;
31533153

31543154
if (! is_utf8_string_loc((U8 *) result, result_len, &error_pos)) {
3155-
_force_out_malformed_utf8_message(error_pos,
3155+
force_out_malformed_utf8_message_(error_pos,
31563156
(U8 *) result + result_len,
31573157
0, /* no flags */
31583158
MALFORMED_UTF8_DIE

proto.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

regexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10917,7 +10917,7 @@ S_reginclass(pTHX_ regexp * const prog, const regnode * const n, const U8* const
1091710917
const U32 utf8n_flags = UTF8_ALLOW_DEFAULT;
1091810918
c = utf8n_to_uvchr(p, p_end - p, &c_len, utf8n_flags | UTF8_CHECK_ONLY);
1091910919
if (c_len == (STRLEN)-1) {
10920-
_force_out_malformed_utf8_message(p, p_end,
10920+
force_out_malformed_utf8_message_(p, p_end,
1092110921
utf8n_flags,
1092210922
MALFORMED_UTF8_DIE);
1092310923
NOT_REACHED; /* NOTREACHED */

toke.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
929929
SvCUR(line),
930930
&first_bad_char_loc)))
931931
{
932-
_force_out_malformed_utf8_message(first_bad_char_loc,
932+
force_out_malformed_utf8_message_(first_bad_char_loc,
933933
(U8 *) s + SvCUR(line),
934934
0,
935935
MALFORMED_UTF8_DIE);
@@ -1546,7 +1546,7 @@ Perl_lex_next_chunk(pTHX_ U32 flags)
15461546
PL_parser->bufend - PL_parser->bufptr,
15471547
&first_bad_char_loc)))
15481548
{
1549-
_force_out_malformed_utf8_message(first_bad_char_loc,
1549+
force_out_malformed_utf8_message_(first_bad_char_loc,
15501550
(U8 *) PL_parser->bufend,
15511551
0,
15521552
MALFORMED_UTF8_DIE);
@@ -1636,7 +1636,7 @@ Perl_lex_peek_unichar(pTHX_ U32 flags)
16361636
}
16371637
unichar = utf8n_to_uvchr((U8*)s, bufend-s, &retlen, UTF8_CHECK_ONLY);
16381638
if (retlen == (STRLEN)-1) {
1639-
_force_out_malformed_utf8_message((U8 *) s,
1639+
force_out_malformed_utf8_message_((U8 *) s,
16401640
(U8 *) bufend,
16411641
0,
16421642
MALFORMED_UTF8_DIE);
@@ -3023,7 +3023,7 @@ Perl_get_and_check_backslash_N_name(pTHX_ const char* s,
30233023
if (UNLIKELY(! is_utf8_string_loc((U8 *) str, len,
30243024
&first_bad_char_loc)))
30253025
{
3026-
_force_out_malformed_utf8_message(first_bad_char_loc,
3026+
force_out_malformed_utf8_message_(first_bad_char_loc,
30273027
(U8 *) PL_parser->bufend,
30283028
0,
30293029
MALFORMED_UTF8_WARN);
@@ -9618,7 +9618,7 @@ Perl_yylex(pTHX)
96189618
PL_bufend - PL_bufptr,
96199619
&first_bad_char_loc)))
96209620
{
9621-
_force_out_malformed_utf8_message(first_bad_char_loc,
9621+
force_out_malformed_utf8_message_(first_bad_char_loc,
96229622
(U8 *) PL_bufend,
96239623
0,
96249624
MALFORMED_UTF8_DIE);

utf8.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ within non-zero characters.
4747
*/
4848

4949
void
50-
Perl__force_out_malformed_utf8_message(pTHX_
50+
Perl_force_out_malformed_utf8_message_(pTHX_
5151
const U8 *const p, /* First byte in UTF-8 sequence */
5252
const U8 * const e, /* Final byte in sequence (may include
5353
multiple chars */
5454
const U32 flags, /* Flags to pass to utf8_to_uv(),
5555
usually 0, or some DISALLOW flags */
5656
const bool die_here) /* If TRUE, this function does not return */
5757
{
58+
PERL_ARGS_ASSERT_FORCE_OUT_MALFORMED_UTF8_MESSAGE_;
59+
5860
/* This core-only function is to be called when a malformed UTF-8 character
5961
* is found, in order to output the detailed information about the
6062
* malformation before dieing. The reason it exists is for the occasions
@@ -69,8 +71,6 @@ Perl__force_out_malformed_utf8_message(pTHX_
6971
* die themselves */
7072
U32 errors;
7173

72-
PERL_ARGS_ASSERT__FORCE_OUT_MALFORMED_UTF8_MESSAGE;
73-
7474
ENTER;
7575
SAVEI8(PL_dowarn);
7676
SAVESPTR(PL_curcop);
@@ -86,7 +86,7 @@ Perl__force_out_malformed_utf8_message(pTHX_
8686
LEAVE;
8787

8888
if (! errors) {
89-
Perl_croak(aTHX_ "panic: _force_out_malformed_utf8_message should"
89+
Perl_croak(aTHX_ "panic: force_out_malformed_utf8_message_ should"
9090
" be called only when there are errors found");
9191
}
9292

@@ -3734,7 +3734,7 @@ S_is_utf8_common(pTHX_ const U8 *const p, const U8 * const e,
37343734
PERL_ARGS_ASSERT_IS_UTF8_COMMON;
37353735

37363736
if (cp == 0 && (p >= e || *p != '\0')) {
3737-
_force_out_malformed_utf8_message(p, e, 0, MALFORMED_UTF8_DIE);
3737+
force_out_malformed_utf8_message_(p, e, 0, MALFORMED_UTF8_DIE);
37383738
NOT_REACHED; /* NOTREACHED */
37393739
}
37403740

@@ -4279,7 +4279,7 @@ S_turkic_uc(pTHX_ const U8 * const p, const U8 * const e,
42794279
STRLEN len_result; \
42804280
result = utf8n_to_uvchr(p, e - p, &len_result, UTF8_CHECK_ONLY); \
42814281
if (len_result == (STRLEN) -1) { \
4282-
_force_out_malformed_utf8_message(p, e, 0, MALFORMED_UTF8_DIE ); \
4282+
force_out_malformed_utf8_message_(p, e, 0, MALFORMED_UTF8_DIE ); \
42834283
}
42844284

42854285
#define CASE_CHANGE_BODY_END(locale_flags, change_macro) \

0 commit comments

Comments
 (0)