summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-10-18 16:15:22 +0000
committerNicholas Clark <nick@ccl4.org>2007-10-18 16:15:22 +0000
commit82af65938b18604bedb1e907fce033a213303aaf (patch)
tree01a550e5b9d9140d5e78953a9fd170d5d7c3b19f /gv.c
parentd7f245dc89b09703977f3c8fb7eb78bc41a0bcee (diff)
downloadperl-82af65938b18604bedb1e907fce033a213303aaf.tar.gz
In Perl_amagic_call(), construct the SV with newSVpvn(), as we now know
the length. (Not sure why I didn't spot this one during change 32124.) p4raw-id: //depot/perl@32132
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index a9eb65a853..d34d04328c 100644
--- a/gv.c
+++ b/gv.c
@@ -2037,7 +2037,8 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags)
PUSHs(lr>0? left: right);
PUSHs( lr > 0 ? &PL_sv_yes : ( assign ? &PL_sv_undef : &PL_sv_no ));
if (notfound) {
- PUSHs( sv_2mortal(newSVpv(AMG_id2name(method + assignshift),0)));
+ PUSHs( sv_2mortal(newSVpvn(AMG_id2name(method + assignshift),
+ AMG_id2namelen(method + assignshift))));
}
PUSHs((SV*)cv);
PUTBACK;