[svn:parrot] r39211 - in branches/io_rewiring/src: io pmc
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Thu May 28 01:23:06 UTC 2009
Author: whiteknight
Date: Thu May 28 01:23:05 2009
New Revision: 39211
URL: https://trac.parrot.org/parrot/changeset/39211
Log:
[io_rewiring] update Parrot_io_flush
Modified:
branches/io_rewiring/src/io/api.c
branches/io_rewiring/src/pmc/filehandle.pmc
branches/io_rewiring/src/pmc/stringhandle.pmc
Modified: branches/io_rewiring/src/io/api.c
==============================================================================
--- branches/io_rewiring/src/io/api.c Thu May 28 00:59:52 2009 (r39210)
+++ branches/io_rewiring/src/io/api.c Thu May 28 01:23:05 2009 (r39211)
@@ -272,7 +272,10 @@
if (PMC_IS_NULL(pmc))
return;
- Parrot_PCCINVOKE(interp, pmc, CONST_STRING(interp, "flush"), "->");
+ if (VTABLE_does(interp, pmc, CONST_STRING(interp, "file")))
+ Parrot_io_flush_filehandle(interp, pmc);
+ else if (VTABLE_does(interp, pmc, CONST_STRING(interp, "string")))
+ SETATTR_StringHandle_stringhandle(interp, pmc, NULL);
}
/*
Modified: branches/io_rewiring/src/pmc/filehandle.pmc
==============================================================================
--- branches/io_rewiring/src/pmc/filehandle.pmc Thu May 28 00:59:52 2009 (r39210)
+++ branches/io_rewiring/src/pmc/filehandle.pmc Thu May 28 01:23:05 2009 (r39211)
@@ -527,7 +527,7 @@
*/
METHOD flush() {
- Parrot_io_flush_filehandle(interp, SELF);
+ Parrot_io_flush(INTERP, SELF);
}
/*
Modified: branches/io_rewiring/src/pmc/stringhandle.pmc
==============================================================================
--- branches/io_rewiring/src/pmc/stringhandle.pmc Thu May 28 00:59:52 2009 (r39210)
+++ branches/io_rewiring/src/pmc/stringhandle.pmc Thu May 28 01:23:05 2009 (r39211)
@@ -377,7 +377,7 @@
*/
METHOD flush() {
- SET_ATTR_stringhandle(INTERP, SELF, NULL);
+ Parrot_io_flush(INTERP, SELF);
}
/*
More information about the parrot-commits
mailing list