[svn:parrot] r39670 - in branches/io_cleanups: src/io t/op
whiteknight at svn.parrot.org
whiteknight at svn.parrot.org
Fri Jun 19 01:42:39 UTC 2009
Author: whiteknight
Date: Fri Jun 19 01:42:39 2009
New Revision: 39670
URL: https://trac.parrot.org/parrot/changeset/39670
Log:
[io_cleanups] change some things in src/io/filehandle.c to use the GETATTR and SETATTR macros for subclassability. Also, fudge some tests that were relying on FileHandle=Pipe behavior
Modified:
branches/io_cleanups/src/io/filehandle.c
branches/io_cleanups/t/op/io.t
Modified: branches/io_cleanups/src/io/filehandle.c
==============================================================================
--- branches/io_cleanups/src/io/filehandle.c Fri Jun 19 01:01:06 2009 (r39669)
+++ branches/io_cleanups/src/io/filehandle.c Fri Jun 19 01:42:39 2009 (r39670)
@@ -202,11 +202,10 @@
PARROT_EXPORT
void
-Parrot_io_set_flags(SHIM_INTERP, ARGIN(PMC *filehandle), INTVAL flags)
+Parrot_io_set_flags(PARROT_INTERP, ARGIN(PMC *filehandle), INTVAL flags)
{
ASSERT_ARGS(Parrot_io_set_flags)
- Parrot_FileHandle_attributes *handle_struct = PARROT_FILEHANDLE(filehandle);
- handle_struct->flags = flags;
+ SETATTR_FileHandle_flags(interp, filehandle, flags);
}
/*
@@ -227,11 +226,11 @@
PARROT_EXPORT
INTVAL
-Parrot_io_get_flags(SHIM_INTERP, ARGIN(PMC *filehandle))
+Parrot_io_get_flags(PARROT_INTERP, ARGIN(PMC *filehandle))
{
ASSERT_ARGS(Parrot_io_get_flags)
- Parrot_FileHandle_attributes *handle_struct = PARROT_FILEHANDLE(filehandle);
- INTVAL flags = handle_struct->flags;
+ INTVAL flags;
+ GETATTR_FileHandle_flags(interp, filehandle, flags);
return flags;
}
@@ -611,11 +610,12 @@
Parrot_io_is_encoding(PARROT_INTERP, ARGIN(PMC *filehandle), ARGIN(STRING *value))
{
ASSERT_ARGS(Parrot_io_is_encoding)
- Parrot_FileHandle_attributes *handle_struct = PARROT_FILEHANDLE(filehandle);
- if (STRING_IS_NULL(handle_struct->encoding))
+ STRING * encoding;
+ GETATTR_FileHandle_encoding(interp, filehandle, encoding);
+ if (STRING_IS_NULL(encoding))
return 0;
- if (Parrot_str_equal(interp, value, handle_struct->encoding))
+ if (Parrot_str_equal(interp, value, encoding))
return 1;
return 0;
Modified: branches/io_cleanups/t/op/io.t
==============================================================================
--- branches/io_cleanups/t/op/io.t Fri Jun 19 01:01:06 2009 (r39669)
+++ branches/io_cleanups/t/op/io.t Fri Jun 19 01:42:39 2009 (r39670)
@@ -52,7 +52,8 @@
OUTPUT
TODO: {
-local $TODO = 'Unimplemented in this platform, TT #661' unless $^O =~ /linux|darwin|MSWin32/;
+#local $TODO = 'Unimplemented in this platform, TT #661' unless $^O =~ /linux|darwin|MSWin32/;
+local $TODO = "Pipes are being redone";
pir_output_like( <<'CODE', <<'OUTPUT', 'open pipe for reading' );
.include 'iglobals.pasm'
@@ -92,7 +93,8 @@
}
TODO: {
-local $TODO = 'Unimplemented in this platform, TT #661' unless $^O =~ /linux|darwin|MSWin32/;
+#local $TODO = 'Unimplemented in this platform, TT #661' unless $^O =~ /linux|darwin|MSWin32/;
+local $TODO = "Pipes are being redone";
pir_output_is( <<'CODE', <<'OUTPUT', 'open pipe for writing' );
.include 'iglobals.pasm'
More information about the parrot-commits
mailing list