From: Nicholas Clark Date: Sat, 15 Apr 2006 20:19:22 +0000 (+0000) Subject: I believe that it makes little sense for the simple user filters X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=67e70b337a8efad4c893a32652ba61fe203f5803;p=p5sagit%2Fp5-mst-13.2.git I believe that it makes little sense for the simple user filters provided by coderefs to be run in block mode. Hence always read from the upstream filter in line mode, and always call the user's filter with 1 line. p4raw-id: //depot/perl@27821 --- diff --git a/pp_ctl.c b/pp_ctl.c index d7d3fda..43db9de 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -4575,7 +4575,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) SvUPGRADE(upstream, SVt_PV); if (filter_has_file) { - status = FILTER_READ(idx+1, upstream, maxlen); + status = FILTER_READ(idx+1, upstream, 0); } assert(filter_sub); @@ -4590,7 +4590,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) DEFSV = upstream; PUSHMARK(SP); - PUSHs(sv_2mortal(newSViv(maxlen))); + PUSHs(sv_2mortal(newSViv(0))); if (filter_state) { PUSHs(filter_state); }