From: Nicholas Clark Date: Thu, 9 Mar 2006 12:41:40 +0000 (+0000) Subject: Tweaking the order of op creation/op free in Perl_ck_require to Larry's X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f11453cb67be9d8a1114ce1f83b9621c7db2b995;p=p5sagit%2Fp5-mst-13.2.git Tweaking the order of op creation/op free in Perl_ck_require to Larry's order doesn't make tests pass :-(. Nor does it make them fail. p4raw-id: //depot/perl@27435 --- diff --git a/op.c b/op.c index 92dc88a..1471c2f 100644 --- a/op.c +++ b/op.c @@ -6836,18 +6836,18 @@ Perl_ck_require(pTHX_ OP *o) if (gv && GvCVu(gv) && GvIMPORTED_CV(gv)) { OP * const kid = cUNOPo->op_first; - OP * newop - = ck_subr(newUNOP(OP_ENTERSUB, OPf_STACKED, - append_elem(OP_LIST, kid, - scalar(newUNOP(OP_RV2CV, 0, - newGVOP(OP_GV, 0, - gv)))))); + OP * newop; + cUNOPo->op_first = 0; -#ifdef PERL_MAD - op_getmad(o,newop,'O'); -#else +#ifndef PERL_MAD op_free(o); #endif + newop = ck_subr(newUNOP(OP_ENTERSUB, OPf_STACKED, + append_elem(OP_LIST, kid, + scalar(newUNOP(OP_RV2CV, 0, + newGVOP(OP_GV, 0, + gv)))))); + op_getmad(o,newop,'O'); return newop; }