develooper Front page | perl.perl5.porters | Postings from November 2014

[perl #123112] [PATCH 5/5] op.c: one more CHANGE_TYPE callsite

From:
Jim Cromie
Date:
November 2, 2014 21:04
Subject:
[perl #123112] [PATCH 5/5] op.c: one more CHANGE_TYPE callsite
Message ID:
rt-4.0.18-18685-1414962261-1756.123112-75-0@perl.org
# New Ticket Created by  Jim Cromie 
# Please include the string:  [perl #123112]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=123112 >


Here, op_type and op_ppaddr inits were separated by many lines.
Move them together, and replace with CHANGE_TYPE callsite.
---
 op.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/op.c b/op.c
index 79307df..2bb5637 100644
--- a/op.c
+++ b/op.c
@@ -9459,7 +9459,8 @@ Perl_ck_rvconst(pTHX_ OP *o)
 		  && SvTYPE(SvRV(gv)) != SVt_PVCV)
 		    gv_fetchsv(kidsv, GV_ADDMULTI, SVt_PVCV);
 	    }
-	    kid->op_type = OP_GV;
+            CHANGE_TYPE(kid, OP_GV);
+	    kid->op_ppaddr = PL_ppaddr[OP_GV];
 	    SvREFCNT_dec(kid->op_sv);
 #ifdef USE_ITHREADS
 	    /* XXX hack: dependence on sizeof(PADOP) <= sizeof(SVOP) */
@@ -9471,7 +9472,6 @@ Perl_ck_rvconst(pTHX_ OP *o)
 	    kid->op_sv = SvREFCNT_inc_simple_NN(gv);
 #endif
 	    kid->op_private = 0;
-	    kid->op_ppaddr = PL_ppaddr[OP_GV];
 	    /* FAKE globs in the symbol table cause weird bugs (#77810) */
 	    SvFAKE_off(gv);
 	}
-- 
1.8.3.1




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About