From f07ec6dd59215a56bc1159449a9631be7a02a94d Mon Sep 17 00:00:00 2001 From: Zefram Date: Wed, 13 Oct 2010 19:05:19 +0100 Subject: 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. --- toke.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'toke.c') diff --git a/toke.c b/toke.c index 36d1f242db..cba2bd9814 100644 --- a/toke.c +++ b/toke.c @@ -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); -- cgit v1.2.1