This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4623556
)
toke.c: Move declaration
author
Karl Williamson
<khw@cpan.org>
Mon, 13 Feb 2017 18:15:07 +0000
(11:15 -0700)
committer
Karl Williamson
<khw@cpan.org>
Tue, 14 Feb 2017 04:24:04 +0000
(21:24 -0700)
This automatic variable doesn't need such a large scope.
toke.c
patch
|
blob
|
blame
|
history
diff --git
a/toke.c
b/toke.c
index
d529f03
..
b0880b9
100644
(file)
--- a/
toke.c
+++ b/
toke.c
@@
-701,7
+701,6
@@
Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
{
const char *s = NULL;
yy_parser *parser, *oparser;
- const U8* first_bad_char_loc;
if (flags && flags & ~LEX_START_FLAGS)
Perl_croak(aTHX_ "Lexing code internal error (%s)", "lex_start");
@@
-744,6
+743,8
@@
Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, U32 flags)
if (line) {
STRLEN len;
+ const U8* first_bad_char_loc;
+
s = SvPV_const(line, len);
if (SvUTF8(line) && ! is_utf8_string_loc((U8 *) s,