diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-01-31 22:59:27 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-01-31 22:59:27 +0000 |
commit | b3d904f31378536c078f52a858f0bfe70f0bade7 (patch) | |
tree | 8316fe66b00b384ad29c6face883f812414982f2 /toke.c | |
parent | fc2007d4a9b17b1ac334e18213f5b0840803b58d (diff) | |
download | perl-b3d904f31378536c078f52a858f0bfe70f0bade7.tar.gz |
Make Perl_gv_fetchpvn_flags actually heed the passed in length.
This means that \0 bytes in symbolic references now work.
p4raw-id: //depot/perl@27028
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4296,7 +4296,6 @@ Perl_yylex(pTHX) gvp = 0; } else { - len = 0; if (!gv) { /* Mustn't actually add anything to a symbol table. But also don't want to "initialise" any placeholder @@ -4305,6 +4304,7 @@ Perl_yylex(pTHX) gv = gv_fetchpvn_flags(PL_tokenbuf, len, GV_NOADD_NOINIT, SVt_PVCV); } + len = 0; } /* if we saw a global override before, get the right name */ @@ -4450,7 +4450,7 @@ Perl_yylex(pTHX) /* Resolve to GV now. */ if (SvTYPE(gv) != SVt_PVGV) { - gv = gv_fetchpvn_flags(PL_tokenbuf, len, 0, SVt_PVCV); + gv = gv_fetchpv(PL_tokenbuf, 0, SVt_PVCV); assert (SvTYPE(gv) == SVt_PVGV); /* cv must have been some sort of placeholder, so now needs replacing with a real code reference. */ |