From 3b6e69b1b32e689d76dc3c485f17606b4a8d5a93 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Wed, 17 Sep 2014 20:35:15 -0700 Subject: [PATCH] Change IS_PADGV to isGV in op.c:newPADOP MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit IS_PADGV is about to go bye-bye. IS_PADGV was returning true only for GVs marked as being present in the pad. But since any GV can make its way in there (just mention *foo under threads), it’s actually somewhat meaningless. This check in newPADOP is perhaps useless, too, since it is only called by newGVOP in core (so sv is always a GV), and by B::Generate on CPAN, which, again, gives it a GV. --- op.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op.c b/op.c index fec74ca..cdd3c25 100644 --- a/op.c +++ b/op.c @@ -5186,7 +5186,7 @@ Perl_newPADOP(pTHX_ I32 type, I32 flags, SV *sv) padop->op_type = (OPCODE)type; padop->op_ppaddr = PL_ppaddr[type]; padop->op_padix = - pad_alloc(type, IS_PADGV(sv) ? SVf_READONLY : SVs_PADTMP); + pad_alloc(type, isGV(sv) ? SVf_READONLY : SVs_PADTMP); SvREFCNT_dec(PAD_SVl(padop->op_padix)); PAD_SETSV(padop->op_padix, sv); assert(sv); -- 1.8.3.1