develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r33724 - trunk/src/pmc

From:
allison
Date:
December 9, 2008 12:32
Subject:
[svn:parrot] r33724 - trunk/src/pmc
Message ID:
20081209203151.6E0FDCB9AF@x12.develooper.com
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);
     }



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