diff options
author | Father Chrysostomos <sprout@cpan.org> | 2017-09-03 11:12:11 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2017-10-08 13:02:03 -0700 |
commit | f5b4df4d4bd28d083b2621ed5266a9fb57507d0e (patch) | |
tree | 9c9704a799b84f49d2049d1aeaa98be316f7c2c1 /sv.h | |
parent | 738f9dbfd2c2579147ef1010c651a0baeca1e5d4 (diff) | |
download | perl-f5b4df4d4bd28d083b2621ed5266a9fb57507d0e.tar.gz |
Add isGV_or_RVCV macro
This will be useful for a few code paths that need to treat a sub
ref in a stash the same way as a GV.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -2146,6 +2146,10 @@ See also C<L</PL_sv_yes>> and C<L</PL_sv_no>>. assert (!SvIOKp(sv)); \ (SvFLAGS(sv) &= ~SVpgv_GP); \ } STMT_END +#ifdef PERL_CORE +# define isGV_or_RVCV(kadawp) \ + (isGV(kadawp) || (SvROK(kadawp) && SvTYPE(SvRV(kadawp)) == SVt_PVCV)) +#endif #define isREGEXP(sv) \ (SvTYPE(sv) == SVt_REGEXP \ || (SvFLAGS(sv) & (SVTYPEMASK|SVpgv_GP|SVf_FAKE)) \ |