diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-11-19 23:06:46 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-11-20 14:13:59 -0800 |
commit | 9c0a60906babcaff328d90d8185138582eb47a13 (patch) | |
tree | 398d8bfcbef24236ede4219f7dd194c07d1d0bcf /gv.c | |
parent | 8fe0571645619844c3a4f2defc3990634138e838 (diff) | |
download | perl-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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)); |