develooper Front page | perl.perl5.changes | Postings from November 2010

[perl.git] branch blead, updated. v5.13.7-190-g0f93bb20

From:
Nicholas Clark
Date:
November 29, 2010 06:30
Subject:
[perl.git] branch blead, updated. v5.13.7-190-g0f93bb20
Message ID:
E1PN4kY-0007V4-F8@camel.ams6.corp.booking.com
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 <nick@ccl4.org>
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



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About