no need to FIXME, it behaves like read() which is the intent
authorTony Cook <tony@develop-help.com>
Sat, 17 Mar 2012 02:10:29 +0000 (13:10 +1100)
committerTony Cook <tony@develop-help.com>
Sat, 8 Dec 2012 22:32:46 +0000 (09:32 +1100)
except read() doesn't complain about the invalid characters like
sv_gets().

sv.c

diff --git a/sv.c b/sv.c
index 34dc534..da10129 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -7746,11 +7746,12 @@ S_sv_gets_read_record(pTHX_ SV *const sv, PerlIO *const fp, I32 append)
                    if (morebytesread <= 0) {
                        /* we're done, if we still have incomplete
                           characters the check code in sv_gets() will
-                          warn and zero them.
+                          warn about them.
 
-                          FIXME: If we've read more than one lead
-                          character for an incomplete character, push
-                          it back.
+                          I'd originally considered doing
+                          PerlIO_ungetc() on all but the lead
+                          character of the incomplete character, but
+                          read() doesn't do that, so I don't.
                        */
                        break;
                    }