In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0f93bb20132f1d122993dac5d6e249240a28646e?hp=3ad6135dbb7d518600eac9177c7f007cdfccf5ba>

- Log -----------------------------------------------------------------
commit 0f93bb20132f1d122993dac5d6e249240a28646e
Author: Nicholas Clark <[email protected]>
Date:   Mon Nov 29 14:13:03 2010 +0000

    In Perl_sv_gets(), shortbuffered is always 0 when rslen is 0.
    
    Hence we can jump past the test C<if (shortbuffered)> after the "this 
screams
    louder" block, as that is only reached where rslen is 0.
-----------------------------------------------------------------------

Summary of changes:
 sv.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sv.c b/sv.c
index 5adefc6..3c97b80 100644
--- a/sv.c
+++ b/sv.c
@@ -7600,6 +7600,8 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO 
*const fp, I32 append)
                bp += cnt;                           /* screams  |  dust */
                ptr += cnt;                          /* louder   |  sed :-) */
                cnt = 0;
+               assert (!shortbuffered);
+               goto cannot_be_shortbuffered;
            }
        }
        
@@ -7613,6 +7615,7 @@ Perl_sv_gets(pTHX_ register SV *const sv, register PerlIO 
*const fp, I32 append)
            continue;
        }
 
+    cannot_be_shortbuffered:
        DEBUG_P(PerlIO_printf(Perl_debug_log,
                              "Screamer: going to getc, ptr=%"UVuf", cnt=%ld\n",
                              PTR2UV(ptr),(long)cnt));

--
Perl5 Master Repository

Reply via email to