summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-11-19 23:06:46 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-11-20 14:13:59 -0800
commit9c0a60906babcaff328d90d8185138582eb47a13 (patch)
tree398d8bfcbef24236ede4219f7dd194c07d1d0bcf /gv.c
parent8fe0571645619844c3a4f2defc3990634138e838 (diff)
downloadperl-9c0a60906babcaff328d90d8185138582eb47a13.tar.gz
Add len flag to newCONSTSUB_flags
This function was added after 5.14.0, so it is not too late to change it. It is currently unused.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 90fb13a386..1f1ee0608e 100644
--- a/gv.c
+++ b/gv.c
@@ -376,7 +376,10 @@ Perl_gv_init_pvn(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, U32 flag
name0 = savepvn(name,len);
/* newCONSTSUB takes ownership of the reference from us. */
- cv = newCONSTSUB_flags(stash, (name0 ? name0 : name), flags, has_constant);
+ cv = newCONSTSUB_flags(
+ stash, (name0 ? name0 : name),
+ strlen(name0 ? name0 : name), flags, has_constant
+ );
/* In case op.c:S_process_special_blocks stole it: */
if (!GvCV(gv))
GvCV_set(gv, (CV *)SvREFCNT_inc_simple_NN(cv));