summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@ggoossen.net>2009-11-24 11:27:04 +0100
committerJesse Vincent <jesse@bestpractical.com>2009-11-25 14:31:28 -0500
commite190e9b4a60aee60dfa0e20320d818bc26b18432 (patch)
treedc61c351e3ced21d174fc38adc195a11196b50ec /pp.c
parent860054a89b3735a633f33a7a3fc99a8642e76384 (diff)
downloadperl-e190e9b4a60aee60dfa0e20320d818bc26b18432.tar.gz
Add assertions that pp_padav and pp_padhv push scalars of the correct type.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index b271e7b41f..292feb6200 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))