summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-04-25 15:41:48 +0100
committerNicholas Clark <nick@ccl4.org>2010-04-26 21:09:54 +0100
commit67549bd2d9da9e6710cdab4542e708ef4d4346b6 (patch)
treedd10c6ceb21eec955d442f1f38693673a62fe647 /av.c
parentbbda9cad3990b2899f9b14eed43d91fea90bd738 (diff)
downloadperl-67549bd2d9da9e6710cdab4542e708ef4d4346b6.tar.gz
For Perl_magic_methcall() add G_UNDEF_FILL to fill the stack with &PL_sv_undef.
This replaces the previous special case of using a negative argument count to signify this, allowing the argument count to become unsigned. Rename it from n to argc.
Diffstat (limited to 'av.c')
-rw-r--r--av.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/av.c b/av.c
index a3dc4ddf73..acedd00dfb 100644
--- a/av.c
+++ b/av.c
@@ -632,8 +632,8 @@ Perl_av_unshift(pTHX_ register AV *av, register I32 num)
Perl_croak(aTHX_ "%s", PL_no_modify);
if ((mg = SvTIED_mg((const SV *)av, PERL_MAGIC_tied))) {
- magic_methcall(MUTABLE_SV(av), mg, "UNSHIFT", G_DISCARD,
- -num, NULL, NULL);
+ magic_methcall(MUTABLE_SV(av), mg, "UNSHIFT", G_DISCARD | G_UNDEF_FILL,
+ num, NULL, NULL);
return;
}