Integrate mainline into perlio
authorNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 22 Apr 2002 08:02:58 +0000 (08:02 +0000)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Mon, 22 Apr 2002 08:02:58 +0000 (08:02 +0000)
p4raw-id: //depot/perlio@16064

1  2 
ext/Encode/t/perlio.t
ext/PerlIO/encoding/encoding.xs
perl.h

Simple merge
@@@ -302,15 -237,8 +302,15 @@@ PerlIOEncode_fill(pTHX_ PerlIO * f
            if (SvLEN(e->dataSV) && SvPVX(e->dataSV)) {
                Safefree(SvPVX(e->dataSV));
            }
-           if (use > e->base.bufsiz) {
+           if (use > (SSize_t)e->base.bufsiz) {
 -             use = e->base.bufsiz;
 +              if (e->flags & NEEDS_LINES) {
 +                  /* Have to grow buffer */
 +                  e->base.bufsiz = use;
 +                  PerlIOEncode_get_base(aTHX_ f);
 +              }
 +              else {
 +                  use = e->base.bufsiz;
 +              }
            }
            SvPVX(e->dataSV) = (char *) ptr;
            SvLEN(e->dataSV) = 0;  /* Hands off sv.c - it isn't yours */
diff --cc perl.h
Simple merge