diff options
author | Zefram <zefram@fysh.org> | 2010-10-13 19:05:19 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-21 05:52:30 -0700 |
commit | f07ec6dd59215a56bc1159449a9631be7a02a94d (patch) | |
tree | 11506817a1f4546234403635605c632e58a24f2b /toke.c | |
parent | a3a44df66ac2cb0beb603b3dd9697fd81cfcfb30 (diff) | |
download | perl-f07ec6dd59215a56bc1159449a9631be7a02a94d.tar.gz |
remove filter inheritance option from lex_start
The only uses of lex_start that had the new_filter parameter false,
to make the new lexer context share source filters with the previous
lexer context, were uses with rsfp null, which therefore never invoked
source filters. Inheriting source filters from a logically unrelated
file seems like a silly idea anyway.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -654,13 +654,10 @@ S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen) * * line holds any initial content already read from the file (or in * the case of no file, such as an eval, the whole contents); - * - * new_filter indicates that this is a new file and it shouldn't inherit - * the filters from the current parser (ie require). */ void -Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) +Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp) { dVAR; const char *s = NULL; @@ -693,8 +690,7 @@ Perl_lex_start(pTHX_ SV *line, PerlIO *rsfp, bool new_filter) parser->lex_state = LEX_NORMAL; parser->expect = XSTATE; parser->rsfp = rsfp; - parser->rsfp_filters = (new_filter || !oparser) ? newAV() - : MUTABLE_AV(SvREFCNT_inc(oparser->rsfp_filters)); + parser->rsfp_filters = newAV(); Newx(parser->lex_brackstack, 120, char); Newx(parser->lex_casestack, 12, char); |