[svn:parrot] r48234 - in trunk/src: io pmc

NotFound at svn.parrot.org NotFound at svn.parrot.org
Sat Jul 31 14:13:36 UTC 2010


Author: NotFound
Date: Sat Jul 31 14:13:36 2010
New Revision: 48234
URL: https://trac.parrot.org/parrot/changeset/48234

Log:
call StringHandle.open from Parrot_io_open, not the other way

Modified:
   trunk/src/io/api.c
   trunk/src/pmc/stringhandle.pmc

Modified: trunk/src/io/api.c
==============================================================================
--- trunk/src/io/api.c	Fri Jul 30 21:56:50 2010	(r48233)
+++ trunk/src/io/api.c	Sat Jul 31 14:13:36 2010	(r48234)
@@ -146,10 +146,6 @@
         SETATTR_FileHandle_mode(interp, new_filehandle, mode);
         Parrot_io_setbuf(interp, filehandle, PIO_UNBOUND);
     }
-    else if (new_filehandle->vtable->base_type == enum_class_StringHandle) {
-        SETATTR_StringHandle_flags(interp, pmc, flags);
-        filehandle = pmc;
-    }
     else
         Parrot_pcc_invoke_method_from_c_args(interp, new_filehandle, CONST_STRING(interp, "open"), "SS->P", path, mode, &filehandle);
     return filehandle;

Modified: trunk/src/pmc/stringhandle.pmc
==============================================================================
--- trunk/src/pmc/stringhandle.pmc	Fri Jul 30 21:56:50 2010	(r48233)
+++ trunk/src/pmc/stringhandle.pmc	Sat Jul 31 14:13:36 2010	(r48234)
@@ -207,7 +207,8 @@
             SET_ATTR_mode(INTERP, SELF, open_mode);
         }
 
-        SELF = Parrot_io_open(INTERP, SELF, filename, open_mode);
+        flags = Parrot_io_parse_open_flags(INTERP, open_mode);
+        SET_ATTR_flags(INTERP, SELF, flags);
 
         RETURN(PMC *SELF);
     }


More information about the parrot-commits mailing list