This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c:lex_start: Move len into the only block that uses it
authorFather Chrysostomos <sprout@cpan.org>
Sun, 6 Nov 2011 22:25:42 +0000 (14:25 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 6 Nov 2011 22:25:42 +0000 (14:25 -0800)
toke.c

diff --git a/toke.c b/toke.c
index 7a8c763..aec7101 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -683,7 +683,6 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
 {
     dVAR;
     const char *s = NULL;
-    STRLEN len;
     yy_parser *parser, *oparser;
     if (flags && flags & ~LEX_START_FLAGS)
        Perl_croak(aTHX_ "Lexing code internal error (%s)", "lex_start");
@@ -724,6 +723,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
     *parser->lex_casestack = '\0';
 
     if (line) {
+       STRLEN len;
        s = SvPV_const(line, len);
        parser->linestr = flags & LEX_START_COPIED
                            ? SvREFCNT_inc_simple_NN(line)