Author: allison
Date: Tue Dec  9 12:31:50 2008
New Revision: 33724

Modified:
   trunk/src/pmc/filehandle.pmc

Log:
[pdd22io] Add a default interactive readline, that reads a line from the
current filehandle.


Modified: trunk/src/pmc/filehandle.pmc
==============================================================================
--- trunk/src/pmc/filehandle.pmc        (original)
+++ trunk/src/pmc/filehandle.pmc        Tue Dec  9 12:31:50 2008
@@ -301,7 +301,10 @@
         }
 #endif
 
-        string_result = CONST_STRING(INTERP, "");
+        if (!(PARROT_FILEHANDLE(SELF)->flags & PIO_F_LINEBUF))
+            Parrot_io_setlinebuf(INTERP, SELF);
+
+        string_result = Parrot_io_reads(INTERP, SELF, 0);
 
         RETURN(STRING *string_result);
     }

Reply via email to