summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-26 23:50:06 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-26 23:58:03 -0700
commitf650fa729f03aabdf12058228971129d911b4aa1 (patch)
treec3f5c89c23a685ae9e36d2b15dfdc41782ec80ce /pp_ctl.c
parent014333460b4235140c1e4ad346b2581af7ff6592 (diff)
downloadperl-f650fa729f03aabdf12058228971129d911b4aa1.tar.gz
&CORE::reset()
This commit allows &CORE::reset to be called through references and via ampersand syntax. pp_reset is modified to take into account the nulls pushed on to the stack in pp_coreargs, which happens because pp_coreargs has no other way to tell reset how many arguments it’s actually getting. See commit 0163043a for details.
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 971e78b451..67b11e3228 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2007,7 +2007,8 @@ PP(pp_reset)
{
dVAR;
dSP;
- const char * const tmps = (MAXARG < 1) ? (const char *)"" : POPpconstx;
+ const char * const tmps =
+ (MAXARG < 1 || (!TOPs && !POPs)) ? (const char *)"" : POPpconstx;
sv_reset(tmps, CopSTASH(PL_curcop));
PUSHs(&PL_sv_yes);
RETURN;