From: Bo Borgerson Date: Thu, 3 Sep 2009 19:31:34 +0000 (-0400) Subject: Reduce #ifdefs in Perl_ck_shift X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=821005df620220206ad90d589e3049bcfbf0b3db;p=p5sagit%2Fp5-mst-13.2.git Reduce #ifdefs in Perl_ck_shift --- diff --git a/op.c b/op.c index e31c050..db5dea8 100644 --- a/op.c +++ b/op.c @@ -7702,20 +7702,15 @@ Perl_ck_shift(pTHX_ OP *o) PERL_ARGS_ASSERT_CK_SHIFT; if (!(o->op_flags & OPf_KIDS)) { - OP *argop; - /* FIXME - this can be refactored to reduce code in #ifdefs */ -#ifdef PERL_MAD - OP * const oldo = o; -#else - op_free(o); -#endif - argop = newUNOP(OP_RV2AV, 0, + OP *argop = newUNOP(OP_RV2AV, 0, scalar(newGVOP(OP_GV, 0, CvUNIQUE(PL_compcv) ? PL_argvgv : PL_defgv))); #ifdef PERL_MAD + OP * const oldo = o; o = newUNOP(type, 0, scalar(argop)); op_getmad(oldo,o,'O'); return o; #else + op_free(o); return newUNOP(type, 0, scalar(argop)); #endif }