From: Gerard Goossen Date: Tue, 24 Nov 2009 10:27:04 +0000 (+0100) Subject: Add assertions that pp_padav and pp_padhv push scalars of the correct type. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e190e9b4a60aee60dfa0e20320d818bc26b18432;p=p5sagit%2Fp5-mst-13.2.git Add assertions that pp_padav and pp_padhv push scalars of the correct type. --- diff --git a/pp.c b/pp.c index b271e7b..292feb6 100644 --- a/pp.c +++ b/pp.c @@ -63,6 +63,7 @@ PP(pp_padav) { dVAR; dSP; dTARGET; I32 gimme; + assert(SvTYPE(TARG) == SVt_PVAV); if (PL_op->op_private & OPpLVAL_INTRO) if (!(PL_op->op_private & OPpPAD_STATE)) SAVECLEARSV(PAD_SVl(PL_op->op_targ)); @@ -106,6 +107,7 @@ PP(pp_padhv) dVAR; dSP; dTARGET; I32 gimme; + assert(SvTYPE(TARG) == SVt_PVHV); XPUSHs(TARG); if (PL_op->op_private & OPpLVAL_INTRO) if (!(PL_op->op_private & OPpPAD_STATE))