Skip to content

Commit 4bb3572

Browse files
committed
Change names with leading underscores to be legal
It is undefined behavior in C for a symbol name to begin with an underscore followed by a capital letter or a second underscore. It is also undefined behavior for a symbol at file scope to begin with an underscore followed by a lowercase letter. C++ further restricts any leading underscore in file scope. Our headers need to be able to compile with C++, so the restriction for headers is never begin a symbol with an underscore. Some people compile core perl using C++, and sometimes we move symbols into headers. Therefore a reasonable rule is to not begin file-scoped symbols with an underscore. There are a hundred-ish symbols in the perl core that do begin with an underscore, not all of them currently in file scope. This series of commits renames almost all of them to instead have a single trailing underscore (thus retaining a visual clue that these are special in some way). It doesn't do the ones that already have a pull request in progress for (submitted, or a WIP on my box), nor for the ones that are generated by scripts, as those are a bit more complicated. The symbols changed here are the ones that are simple to do. Some of the symbols changed here are ones I introduced, out of ignorance of the C standard's wording on these. Each commit changes a single symbol The consequences of them being the way they are now are minimal, Only if a C implementation changed to use one of our symbols would there be a symbol clash, or we got ported to a new C compiler. The odds of these being problesm are fairly low. Yet they are non-zero, and we do have existing symbol clashes with other software that they have had to work around. I got tired of running into these symbols and being reminded that these aren't strictly legal, and that I was responsible for some of them. So I ended up with this p.r., removing nearly all of them at once. The commits here change even symbols that aren't currently file-level, hence legal. I did this for several reasons 1. Consistency. Not only for appearance, but If most of the symbols had used trailing underscores when I started on this project, I would have gotten the hint to do so too. Other people creating new symbols are less likely to create potentially clashing ones. 2. Some people, including me, think the trailing reads better generally. 3. You never have to worry when moving things around if it is going into file scope and is hence undefined behavior
2 parents ab396c3 + b83d816 commit 4bb3572

40 files changed

+892
-892
lines changed

av.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
struct xpvav {
1212
HV* xmg_stash; /* class package */
13-
union _xmgu xmg_u;
13+
union xmgu_ xmg_u;
1414
SSize_t xav_fill; /* Index of last element present */
1515
SSize_t xav_max; /* max index for which array has space */
1616
SV** xav_alloc; /* pointer to beginning of C array of SVs */

class.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,9 @@ PP(pp_methstart)
345345
}
346346

347347
static void
348-
invoke_class_seal(pTHX_ void *_arg)
348+
invoke_class_seal(pTHX_ void *arg_)
349349
{
350-
class_seal_stash((HV *)_arg);
350+
class_seal_stash((HV *)arg_);
351351
}
352352

353353
void

cop.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,8 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
13981398
#define PUSH_MULTICALL_FLAGS(the_cv, flags) \
13991399
STMT_START { \
14001400
PERL_CONTEXT *cx; \
1401-
CV * const _nOnclAshIngNamE_ = the_cv; \
1402-
CV * const cv = _nOnclAshIngNamE_; \
1401+
CV * const nOnclAshIngNamE_ = the_cv; \
1402+
CV * const cv = nOnclAshIngNamE_; \
14031403
PADLIST * const padlist = CvPADLIST(cv); \
14041404
multicall_oldcatch = CATCH_GET; \
14051405
CATCH_SET(TRUE); \
@@ -1442,8 +1442,8 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
14421442

14431443
#define CHANGE_MULTICALL_FLAGS(the_cv, flags) \
14441444
STMT_START { \
1445-
CV * const _nOnclAshIngNamE_ = the_cv; \
1446-
CV * const cv = _nOnclAshIngNamE_; \
1445+
CV * const nOnclAshIngNamE_ = the_cv; \
1446+
CV * const cv = nOnclAshIngNamE_; \
14471447
PADLIST * const padlist = CvPADLIST(cv); \
14481448
PERL_CONTEXT *cx = CX_CUR(); \
14491449
assert(CxMULTICALL(cx)); \

cv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
/* This structure must match the beginning of XPVFM in sv.h */
1212

1313
struct xpvcv {
14-
_XPV_HEAD;
15-
_XPVCV_COMMON;
14+
XPV_HEAD_;
15+
XPVCV_COMMON_;
1616
};
1717

1818
/*

dump.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ S_append_flags(pTHX_ SV *sv, U32 flags, const struct flag_to_name *start,
9494
PERL_PV_ESCAPE_NONASCII | PERL_PV_ESCAPE_DWIM \
9595
| ((utf8) ? PERL_PV_ESCAPE_UNI : 0) )
9696

97-
#define _pv_display_for_dump(dsv, pv, cur, len, pvlim) \
97+
#define pv_display_for_dump(dsv, pv, cur, len, pvlim) \
9898
pv_display_flags(dsv, pv, cur, len, pvlim, PERL_PV_ESCAPE_DWIM_ALL_HEX)
9999

100100
/*
@@ -2438,7 +2438,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
24382438
PTR2UV(ptr));
24392439
if (SvOOK(sv)) {
24402440
PerlIO_printf(file, "( %s . ) ",
2441-
_pv_display_for_dump(d, ptr - delta, delta, 0,
2441+
pv_display_for_dump(d, ptr - delta, delta, 0,
24422442
pvlim));
24432443
}
24442444
if (type == SVt_INVLIST) {
@@ -2447,7 +2447,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
24472447
_invlist_dump(file, level, " ", sv);
24482448
}
24492449
else {
2450-
PerlIO_printf(file, "%s", _pv_display_for_dump(d, ptr, SvCUR(sv),
2450+
PerlIO_printf(file, "%s", pv_display_for_dump(d, ptr, SvCUR(sv),
24512451
re ? 0 : SvLEN(sv),
24522452
pvlim));
24532453
if (SvUTF8(sv)) /* the 6? \x{....} */
@@ -2749,7 +2749,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
27492749
keypv = SvPV_const(keysv, len);
27502750
elt = HeVAL(he);
27512751

2752-
Perl_dump_indent(aTHX_ level+1, file, "Elt %s ", _pv_display_for_dump(d, keypv, len, 0, pvlim));
2752+
Perl_dump_indent(aTHX_ level+1, file, "Elt %s ", pv_display_for_dump(d, keypv, len, 0, pvlim));
27532753
if (SvUTF8(keysv))
27542754
PerlIO_printf(file, "[UTF8 \"%s\"] ", sv_uni_display(d, keysv, 6 * SvCUR(keysv), UNI_DISPLAY_QQ));
27552755
if (HvEITER_get(hv) == he)

embed.fnc

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ p |OP * |build_infix_plugin \
806806
|NN OP *lhs \
807807
|NN OP *rhs \
808808
|NN void *tokendata
809-
EXp |const char *|_byte_dump_string \
809+
EXp |const char *|byte_dump_string_ \
810810
|NULLOK const U8 * const start \
811811
|const STRLEN len \
812812
|const bool format
@@ -1665,7 +1665,7 @@ p |void |init_uniprops
16651665
APRTdmp |char * |instr |NN const char *big \
16661666
|NN const char *little
16671667
Adp |U32 |intro_my
1668-
ERXp |Size_t |_inverse_folds |const UV cp \
1668+
ERXp |Size_t |inverse_folds_ |const UV cp \
16691669
|NN U32 *first_folds_to \
16701670
|NN const U32 **remaining_folds_to
16711671
: Used in perly.y
@@ -1719,11 +1719,11 @@ ATdip |bool |is_strict_utf8_string_loclen \
17191719
|STRLEN len \
17201720
|NULLOK const U8 **ep \
17211721
|NULLOK STRLEN *el
1722-
CRp |bool |_is_uni_FOO |const U8 classnum \
1722+
CRp |bool |is_uni_FOO_ |const U8 classnum \
17231723
|const UV c
1724-
CRp |bool |_is_uni_perl_idcont \
1724+
CRp |bool |is_uni_perl_idcont_ \
17251725
|UV c
1726-
CRp |bool |_is_uni_perl_idstart \
1726+
CRp |bool |is_uni_perl_idstart_ \
17271727
|UV c
17281728
ARTdip |Size_t |isUTF8_CHAR |NN const U8 * const s0 \
17291729
|NN const U8 * const e
@@ -1757,17 +1757,17 @@ ATdip |bool |is_utf8_fixed_width_buf_loclen_flags \
17571757
|NULLOK const U8 **ep \
17581758
|NULLOK STRLEN *el \
17591759
|const U32 flags
1760-
CRp |bool |_is_utf8_FOO |const U8 classnum \
1760+
CRp |bool |is_utf8_FOO_ |const U8 classnum \
17611761
|NN const U8 *p \
17621762
|NN const U8 * const e
17631763
ARTdip |bool |is_utf8_invariant_string_loc \
17641764
|NN const U8 * const s \
17651765
|STRLEN len \
17661766
|NULLOK const U8 **ep
1767-
CRp |bool |_is_utf8_perl_idcont \
1767+
CRp |bool |is_utf8_perl_idcont_ \
17681768
|NN const U8 *p \
17691769
|NN const U8 * const e
1770-
CRp |bool |_is_utf8_perl_idstart \
1770+
CRp |bool |is_utf8_perl_idstart_ \
17711771
|NN const U8 *p \
17721772
|NN const U8 * const e
17731773
ARTdmp |bool |is_utf8_string |NN const U8 *s \
@@ -3657,7 +3657,7 @@ Xiop |Stack_off_t|TOPMARK
36573657
Cmp |UV |to_uni_fold |UV c \
36583658
|NN U8 *p \
36593659
|NN STRLEN *lenp
3660-
Cp |UV |_to_uni_fold_flags \
3660+
Cp |UV |to_uni_fold_flags_ \
36613661
|UV c \
36623662
|NN U8 *p \
36633663
|NN STRLEN *lenp \
@@ -3671,26 +3671,26 @@ Cp |UV |to_uni_title |UV c \
36713671
Cp |UV |to_uni_upper |UV c \
36723672
|NN U8 *p \
36733673
|NN STRLEN *lenp
3674-
Cp |UV |_to_utf8_fold_flags \
3674+
Cp |UV |to_utf8_fold_flags_ \
36753675
|NN const U8 *p \
36763676
|NULLOK const U8 *e \
36773677
|NN U8 *ustrp \
36783678
|NULLOK STRLEN *lenp \
36793679
|U8 flags
36803680

3681-
Cp |UV |_to_utf8_lower_flags \
3681+
Cp |UV |to_utf8_lower_flags_ \
36823682
|NN const U8 *p \
36833683
|NULLOK const U8 *e \
36843684
|NN U8 *ustrp \
36853685
|NULLOK STRLEN *lenp \
36863686
|bool flags
3687-
Cp |UV |_to_utf8_title_flags \
3687+
Cp |UV |to_utf8_title_flags_ \
36883688
|NN const U8 *p \
36893689
|NULLOK const U8 *e \
36903690
|NN U8 *ustrp \
36913691
|NULLOK STRLEN *lenp \
36923692
|bool flags
3693-
Cp |UV |_to_utf8_upper_flags \
3693+
Cp |UV |to_utf8_upper_flags_ \
36943694
|NN const U8 *p \
36953695
|NULLOK const U8 *e \
36963696
|NN U8 *ustrp \
@@ -5138,7 +5138,7 @@ ETi |const char *|get_regex_charset_name \
51385138
|NN STRLEN * const lenp
51395139
#endif
51405140
#if defined(PERL_IN_PP_C) || defined(PERL_IN_UTF8_C)
5141-
p |UV |_to_upper_title_latin1 \
5141+
p |UV |to_upper_title_latin1_ \
51425142
|const U8 c \
51435143
|NN U8 *p \
51445144
|NN STRLEN *lenp \
@@ -5366,18 +5366,18 @@ Ep |SSize_t|study_chunk |NN RExC_state_t *pRExC_state \
53665366
|U32 depth \
53675367
|bool was_mutate_ok
53685368
# if defined(PERL_IN_REGCOMP_TRIE_C) && defined(DEBUGGING)
5369-
ES |void |dump_trie |NN const struct _reg_trie_data *trie \
5369+
ES |void |dump_trie |NN const struct reg_trie_data_ *trie \
53705370
|NULLOK HV *widecharmap \
53715371
|NN AV *revcharmap \
53725372
|U32 depth
53735373
ES |void |dump_trie_interim_list \
5374-
|NN const struct _reg_trie_data *trie \
5374+
|NN const struct reg_trie_data_ *trie \
53755375
|NULLOK HV *widecharmap \
53765376
|NN AV *revcharmap \
53775377
|U32 next_alloc \
53785378
|U32 depth
53795379
ES |void |dump_trie_interim_table \
5380-
|NN const struct _reg_trie_data *trie \
5380+
|NN const struct reg_trie_data_ *trie \
53815381
|NULLOK HV *widecharmap \
53825382
|NN AV *revcharmap \
53835383
|U32 next_alloc \
@@ -5602,7 +5602,7 @@ ERp |bool |is_grapheme |NN const U8 *strbeg \
56025602
#endif
56035603
#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || \
56045604
defined(PERL_IN_UTF8_C)
5605-
ETXp |UV |_to_fold_latin1|const U8 c \
5605+
ETXp |UV |to_fold_latin1_|const U8 c \
56065606
|NN U8 *p \
56075607
|NN STRLEN *lenp \
56085608
|const unsigned int flags
@@ -6183,7 +6183,7 @@ RST |U8 |to_lower_latin1|const U8 c \
61836183
|NULLOK U8 *p \
61846184
|NULLOK STRLEN *lenp \
61856185
|const char dummy
6186-
S |UV |_to_utf8_case |const UV original \
6186+
S |UV |to_utf8_case_ |const UV original \
61876187
|NULLOK const U8 *p \
61886188
|NN U8 *ustrp \
61896189
|NN STRLEN *lenp \

embed.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -116,17 +116,6 @@
116116
# define SvTRUE_nomg(a) Perl_SvTRUE_nomg(aTHX_ a)
117117
# define SvUV(a) Perl_SvUV(aTHX_ a)
118118
# define SvUV_nomg(a) Perl_SvUV_nomg(aTHX_ a)
119-
# define _is_uni_FOO(a,b) Perl__is_uni_FOO(aTHX_ a,b)
120-
# define _is_uni_perl_idcont(a) Perl__is_uni_perl_idcont(aTHX_ a)
121-
# define _is_uni_perl_idstart(a) Perl__is_uni_perl_idstart(aTHX_ a)
122-
# define _is_utf8_FOO(a,b,c) Perl__is_utf8_FOO(aTHX_ a,b,c)
123-
# define _is_utf8_perl_idcont(a,b) Perl__is_utf8_perl_idcont(aTHX_ a,b)
124-
# define _is_utf8_perl_idstart(a,b) Perl__is_utf8_perl_idstart(aTHX_ a,b)
125-
# define _to_uni_fold_flags(a,b,c,d) Perl__to_uni_fold_flags(aTHX_ a,b,c,d)
126-
# define _to_utf8_fold_flags(a,b,c,d,e) Perl__to_utf8_fold_flags(aTHX_ a,b,c,d,e)
127-
# define _to_utf8_lower_flags(a,b,c,d,e) Perl__to_utf8_lower_flags(aTHX_ a,b,c,d,e)
128-
# define _to_utf8_title_flags(a,b,c,d,e) Perl__to_utf8_title_flags(aTHX_ a,b,c,d,e)
129-
# define _to_utf8_upper_flags(a,b,c,d,e) Perl__to_utf8_upper_flags(aTHX_ a,b,c,d,e)
130119
# define amagic_call(a,b,c,d) Perl_amagic_call(aTHX_ a,b,c,d)
131120
# define amagic_deref_call(a,b) Perl_amagic_deref_call(aTHX_ a,b)
132121
# define apply_attrs_string(a,b,c,d) Perl_apply_attrs_string(aTHX_ a,b,c,d)
@@ -333,13 +322,19 @@
333322
# define Perl_is_strict_utf8_string is_strict_utf8_string
334323
# define Perl_is_strict_utf8_string_loc is_strict_utf8_string_loc
335324
# define is_strict_utf8_string_loclen Perl_is_strict_utf8_string_loclen
325+
# define is_uni_FOO_(a,b) Perl_is_uni_FOO_(aTHX_ a,b)
326+
# define is_uni_perl_idcont_(a) Perl_is_uni_perl_idcont_(aTHX_ a)
327+
# define is_uni_perl_idstart_(a) Perl_is_uni_perl_idstart_(aTHX_ a)
336328
# define is_utf8_FF_helper_ Perl_is_utf8_FF_helper_
329+
# define is_utf8_FOO_(a,b,c) Perl_is_utf8_FOO_(aTHX_ a,b,c)
337330
# define Perl_is_utf8_char_buf is_utf8_char_buf
338331
# define is_utf8_char_helper_ Perl_is_utf8_char_helper_
339332
# define Perl_is_utf8_fixed_width_buf_flags is_utf8_fixed_width_buf_flags
340333
# define Perl_is_utf8_fixed_width_buf_loc_flags is_utf8_fixed_width_buf_loc_flags
341334
# define is_utf8_fixed_width_buf_loclen_flags Perl_is_utf8_fixed_width_buf_loclen_flags
342335
# define is_utf8_invariant_string_loc Perl_is_utf8_invariant_string_loc
336+
# define is_utf8_perl_idcont_(a,b) Perl_is_utf8_perl_idcont_(aTHX_ a,b)
337+
# define is_utf8_perl_idstart_(a,b) Perl_is_utf8_perl_idstart_(aTHX_ a,b)
343338
# define Perl_is_utf8_string is_utf8_string
344339
# define is_utf8_string_flags Perl_is_utf8_string_flags
345340
# define Perl_is_utf8_string_loc is_utf8_string_loc
@@ -809,9 +804,14 @@
809804
# define sync_locale() Perl_sync_locale(aTHX)
810805
# define taint_env() Perl_taint_env(aTHX)
811806
# define taint_proper(a,b) Perl_taint_proper(aTHX_ a,b)
807+
# define to_uni_fold_flags_(a,b,c,d) Perl_to_uni_fold_flags_(aTHX_ a,b,c,d)
812808
# define to_uni_lower(a,b,c) Perl_to_uni_lower(aTHX_ a,b,c)
813809
# define to_uni_title(a,b,c) Perl_to_uni_title(aTHX_ a,b,c)
814810
# define to_uni_upper(a,b,c) Perl_to_uni_upper(aTHX_ a,b,c)
811+
# define to_utf8_fold_flags_(a,b,c,d,e) Perl_to_utf8_fold_flags_(aTHX_ a,b,c,d,e)
812+
# define to_utf8_lower_flags_(a,b,c,d,e) Perl_to_utf8_lower_flags_(aTHX_ a,b,c,d,e)
813+
# define to_utf8_title_flags_(a,b,c,d,e) Perl_to_utf8_title_flags_(aTHX_ a,b,c,d,e)
814+
# define to_utf8_upper_flags_(a,b,c,d,e) Perl_to_utf8_upper_flags_(aTHX_ a,b,c,d,e)
815815
# define uiv_2buf Perl_uiv_2buf
816816
# define unpackstring(a,b,c,d,e) Perl_unpackstring(aTHX_ a,b,c,d,e)
817817
# define unshare_hek(a) Perl_unshare_hek(aTHX_ a)
@@ -1579,7 +1579,7 @@
15791579
# define lossless_NV_to_IV S_lossless_NV_to_IV
15801580
# endif
15811581
# if defined(PERL_IN_PP_C) || defined(PERL_IN_UTF8_C)
1582-
# define _to_upper_title_latin1(a,b,c,d) Perl__to_upper_title_latin1(aTHX_ a,b,c,d)
1582+
# define to_upper_title_latin1_(a,b,c,d) Perl_to_upper_title_latin1_(aTHX_ a,b,c,d)
15831583
# endif
15841584
# if defined(PERL_IN_PP_CTL_C)
15851585
# define check_type_and_open(a) S_check_type_and_open(aTHX_ a)
@@ -1722,14 +1722,14 @@
17221722
# define sv_derived_from_svpvn(a,b,c,d,e) S_sv_derived_from_svpvn(aTHX_ a,b,c,d,e)
17231723
# endif
17241724
# if defined(PERL_IN_UTF8_C)
1725-
# define _to_utf8_case(a,b,c,d,e,f,g,h,i) S__to_utf8_case(aTHX_ a,b,c,d,e,f,g,h,i)
17261725
# define check_locale_boundary_crossing(a,b,c,d) S_check_locale_boundary_crossing(aTHX_ a,b,c,d)
17271726
# define does_utf8_overflow S_does_utf8_overflow
17281727
# define isFF_overlong S_isFF_overlong
17291728
# define is_utf8_overlong S_is_utf8_overlong
17301729
# define new_msg_hv(a,b,c) S_new_msg_hv(aTHX_ a,b,c)
17311730
# define to_case_cp_list(a,b,c,d,e,f,g,h) S_to_case_cp_list(aTHX_ a,b,c,d,e,f,g,h)
17321731
# define to_lower_latin1 S_to_lower_latin1
1732+
# define to_utf8_case_(a,b,c,d,e,f,g,h,i) S_to_utf8_case_(aTHX_ a,b,c,d,e,f,g,h,i)
17331733
# define turkic_fc(a,b,c,d) S_turkic_fc(aTHX_ a,b,c,d)
17341734
# define turkic_lc(a,b,c,d) S_turkic_lc(aTHX_ a,b,c,d)
17351735
# define turkic_uc(a,b,c,d) S_turkic_uc(aTHX_ a,b,c,d)
@@ -1798,10 +1798,9 @@
17981798
# endif
17991799
# endif /* defined(PERL_CORE) */
18001800
# if defined(PERL_CORE) || defined(PERL_EXT)
1801-
# define _byte_dump_string(a,b,c) Perl__byte_dump_string(aTHX_ a,b,c)
1802-
# define _inverse_folds(a,b,c) Perl__inverse_folds(aTHX_ a,b,c)
18031801
# define append_utf8_from_native_byte Perl_append_utf8_from_native_byte
18041802
# define av_reify(a) Perl_av_reify(aTHX_ a)
1803+
# define byte_dump_string_(a,b,c) Perl_byte_dump_string_(aTHX_ a,b,c)
18051804
# define cntrl_to_mnemonic Perl_cntrl_to_mnemonic
18061805
# define current_re_engine() Perl_current_re_engine(aTHX)
18071806
# define cv_ckproto_len_flags(a,b,c,d,e) Perl_cv_ckproto_len_flags(aTHX_ a,b,c,d,e)
@@ -1811,6 +1810,7 @@
18111810
# define get_deprecated_property_msg Perl_get_deprecated_property_msg
18121811
# define get_prop_definition(a) Perl_get_prop_definition(aTHX_ a)
18131812
# define get_prop_values Perl_get_prop_values
1813+
# define inverse_folds_(a,b,c) Perl_inverse_folds_(aTHX_ a,b,c)
18141814
# define load_charnames(a,b,c,d) Perl_load_charnames(aTHX_ a,b,c,d)
18151815
# define mbtowc_(a,b,c) Perl_mbtowc_(aTHX_ a,b,c)
18161816
# define mg_find_mglob(a) Perl_mg_find_mglob(aTHX_ a)
@@ -1992,7 +1992,7 @@
19921992
# endif
19931993
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || \
19941994
defined(PERL_IN_UTF8_C)
1995-
# define _to_fold_latin1 Perl__to_fold_latin1
1995+
# define to_fold_latin1_ Perl_to_fold_latin1_
19961996
# endif
19971997
# if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
19981998
# define regcurly Perl_regcurly

gv.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,31 +46,31 @@ the need to cast the result to the appropriate type.
4646

4747
#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) && !defined(__INTEL_COMPILER)
4848
# define GvGP(gv) \
49-
((GP *)(*({GV *const _gvgp = (GV *) (gv); \
50-
assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \
51-
assert(isGV_with_GP(_gvgp)); \
52-
&((_gvgp)->sv_u.svu_gp);})))
49+
((GP *)(*({GV *const gvgp_ = (GV *) (gv); \
50+
assert(SvTYPE(gvgp_) == SVt_PVGV || SvTYPE(gvgp_) == SVt_PVLV); \
51+
assert(isGV_with_GP(gvgp_)); \
52+
&((gvgp_)->sv_u.svu_gp);})))
5353
# define GvGP_set(gv,gp) \
54-
{GV *const _gvgp = (GV *) (gv); \
55-
assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \
56-
assert(isGV_with_GP(_gvgp)); \
57-
(_gvgp)->sv_u.svu_gp = (gp); }
54+
{GV *const gvgp_ = (GV *) (gv); \
55+
assert(SvTYPE(gvgp_) == SVt_PVGV || SvTYPE(gvgp_) == SVt_PVLV); \
56+
assert(isGV_with_GP(gvgp_)); \
57+
(gvgp_)->sv_u.svu_gp = (gp); }
5858
# define GvFLAGS(gv) \
59-
(*({GV *const _gvflags = (GV *) (gv); \
60-
assert(SvTYPE(_gvflags) == SVt_PVGV || SvTYPE(_gvflags) == SVt_PVLV); \
61-
assert(isGV_with_GP(_gvflags)); \
62-
&(GvXPVGV(_gvflags)->xpv_cur);}))
59+
(*({GV *const gvflags_ = (GV *) (gv); \
60+
assert(SvTYPE(gvflags_) == SVt_PVGV || SvTYPE(gvflags_) == SVt_PVLV); \
61+
assert(isGV_with_GP(gvflags_)); \
62+
&(GvXPVGV(gvflags_)->xpv_cur);}))
6363
# define GvSTASH(gv) \
64-
(*({ GV * const _gvstash = (GV *) (gv); \
65-
assert(isGV_with_GP(_gvstash)); \
66-
assert(SvTYPE(_gvstash) == SVt_PVGV || SvTYPE(_gvstash) >= SVt_PVLV); \
67-
&(GvXPVGV(_gvstash)->xnv_u.xgv_stash); \
64+
(*({ GV * const gvstash_ = (GV *) (gv); \
65+
assert(isGV_with_GP(gvstash_)); \
66+
assert(SvTYPE(gvstash_) == SVt_PVGV || SvTYPE(gvstash_) >= SVt_PVLV); \
67+
&(GvXPVGV(gvstash_)->xnv_u.xgv_stash); \
6868
}))
6969
# define GvNAME_HEK(gv) \
70-
(*({ GV * const _gvname_hek = (GV *) (gv); \
71-
assert(isGV_with_GP(_gvname_hek)); \
72-
assert(SvTYPE(_gvname_hek) == SVt_PVGV || SvTYPE(_gvname_hek) >= SVt_PVLV); \
73-
&(GvXPVGV(_gvname_hek)->xiv_u.xivu_namehek); \
70+
(*({ GV * const gvname_hek_ = (GV *) (gv); \
71+
assert(isGV_with_GP(gvname_hek_)); \
72+
assert(SvTYPE(gvname_hek_) == SVt_PVGV || SvTYPE(gvname_hek_) >= SVt_PVLV); \
73+
&(GvXPVGV(gvname_hek_)->xiv_u.xivu_namehek); \
7474
}))
7575
# define GvNAME_get(gv) ({ assert(GvNAME_HEK(gv)); (char *)HEK_KEY(GvNAME_HEK(gv)); })
7676
# define GvNAMELEN_get(gv) ({ assert(GvNAME_HEK(gv)); HEK_LEN(GvNAME_HEK(gv)); })

0 commit comments

Comments
 (0)