diff options
author | Karl Williamson <khw@cpan.org> | 2020-09-06 13:10:02 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-09-09 19:56:34 -0600 |
commit | 041c1a236adc7fba9323bf915d40b86b247edf2a (patch) | |
tree | 8bb85ba39774e0732548836b140d32fea7753995 | |
parent | b440465d5a4b3b04a3503d257418cf65ade0cbdb (diff) | |
download | perl-041c1a236adc7fba9323bf915d40b86b247edf2a.tar.gz |
Use macro instead of its expansion
We already have a macro that expands to what this code does; it's
clearer to use it.
-rw-r--r-- | gv.h | 2 | ||||
-rw-r--r-- | handy.h | 2 | ||||
-rw-r--r-- | op.h | 2 | ||||
-rw-r--r-- | regexp.h | 2 | ||||
-rw-r--r-- | sv.h | 8 |
5 files changed, 8 insertions, 8 deletions
@@ -26,7 +26,7 @@ struct gp { #define GvXPVGV(gv) ((XPVGV*)SvANY(gv)) -#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__INTEL_COMPILER) +#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) && !defined(__INTEL_COMPILER) # define GvGP(gv) \ (0+(*({GV *const _gvgp = (GV *) (gv); \ assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \ @@ -93,7 +93,7 @@ already-built-in ones return pointers to what their names indicate. =cut */ -#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#if defined(PERL_USE_GCC_BRACE_GROUPS) # define MUTABLE_PTR(p) ({ void *p_ = (p); p_; }) #else # define MUTABLE_PTR(p) ((void *) (p)) @@ -396,7 +396,7 @@ struct pmop { #else # define PmopSTASH(o) \ (((o)->op_pmflags & PMf_ONCE) ? (o)->op_pmstashstartu.op_pmstash : NULL) -# if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +# if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) # define PmopSTASH_set(o,hv) ({ \ assert((o)->op_pmflags & PMf_ONCE); \ ((o)->op_pmstashstartu.op_pmstash = (hv)); \ @@ -608,7 +608,7 @@ and check for NULL. the start pos (so s/.\G// would fail on second iteration */ -#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#if defined(PERL_USE_GCC_BRACE_GROUPS) # define ReREFCNT_inc(re) \ ({ \ /* This is here to generate a casting warning if incorrect. */ \ @@ -1147,7 +1147,7 @@ object type. Exposed to perl code via Internals::SvREADONLY(). #endif -#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) # define SvTAIL(sv) ({ const SV *const _svtail = (const SV *)(sv); \ assert(SvTYPE(_svtail) != SVt_PVAV); \ assert(SvTYPE(_svtail) != SVt_PVHV); \ @@ -1199,7 +1199,7 @@ object type. Exposed to perl code via Internals::SvREADONLY(). # endif # define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur) -# if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +# if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) /* These get expanded inside other macros that already use a variable _sv */ # define SvPVX(sv) \ (*({ SV *const _svpvx = MUTABLE_SV(sv); \ @@ -1414,7 +1414,7 @@ object type. Exposed to perl code via Internals::SvREADONLY(). # define BmFLAGS(sv) (SvTAIL(sv) ? FBMcf_TAIL : 0) #endif -#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) # define BmUSEFUL(sv) \ (*({ SV *const _bmuseful = MUTABLE_SV(sv); \ assert(SvTYPE(_bmuseful) >= SVt_PVIV); \ @@ -1873,7 +1873,7 @@ Like C<sv_catsv> but doesn't process magic. ? TRUE \ : (fallback)) -#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#if defined(PERL_USE_GCC_BRACE_GROUPS) # define SvIVx(sv) ({SV *_sv = MUTABLE_SV(sv); SvIV(_sv); }) # define SvUVx(sv) ({SV *_sv = MUTABLE_SV(sv); SvUV(_sv); }) |