diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2007-05-12 19:51:37 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2007-05-12 19:51:37 +0000 |
commit | 7c4baf47da775f39e368d242f76a86f4e592cb5a (patch) | |
tree | 7216c2cad1fbadcccaa61cfb4a90854e0acda2ba /toke.c | |
parent | 5486870fe7f0fd0e99bf9619d5fd857a5b972014 (diff) | |
download | perl-7c4baf47da775f39e368d242f76a86f4e592cb5a.tar.gz |
save old PL_curcop value in parser struct
p4raw-id: //depot/perl@31201
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -671,11 +671,10 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) /* on scope exit, free this parser and restore any outer one */ SAVEPARSER(parser); + parser->saved_curcop = PL_curcop; /* initialise lexer state */ - SAVECOPLINE(PL_curcop); - #ifdef PERL_MAD parser->curforce = -1; #else @@ -723,6 +722,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) void Perl_parser_free(pTHX_ const yy_parser *parser) { + PL_curcop = parser->saved_curcop; SvREFCNT_dec(parser->linestr); if (parser->rsfp == PerlIO_stdin()) |