[svn:parrot] r39262 - in branches/io_rewiring: include/parrot src/pmc
Infinoid at svn.parrot.org
Infinoid at svn.parrot.org
Sat May 30 12:58:57 UTC 2009
Author: Infinoid
Date: Sat May 30 12:58:57 2009
New Revision: 39262
URL: https://trac.parrot.org/parrot/changeset/39262
Log:
[io] Make PIO_INVALID_HANDLE available to more than just the FileHandle PMC.
Modified:
branches/io_rewiring/include/parrot/io_portable.h
branches/io_rewiring/include/parrot/io_unix.h
branches/io_rewiring/include/parrot/io_win32.h
branches/io_rewiring/src/pmc/filehandle.pmc
Modified: branches/io_rewiring/include/parrot/io_portable.h
==============================================================================
--- branches/io_rewiring/include/parrot/io_portable.h Sat May 30 12:58:52 2009 (r39261)
+++ branches/io_rewiring/include/parrot/io_portable.h Sat May 30 12:58:57 2009 (r39262)
@@ -16,6 +16,8 @@
typedef FILE* PIOHANDLE;
typedef long PIOOFF_T;
+#define PIO_INVALID_HANDLE NULL
+
/* HEADERIZER BEGIN: src/io/portable.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/io_rewiring/include/parrot/io_unix.h
==============================================================================
--- branches/io_rewiring/include/parrot/io_unix.h Sat May 30 12:58:52 2009 (r39261)
+++ branches/io_rewiring/include/parrot/io_unix.h Sat May 30 12:58:57 2009 (r39262)
@@ -18,6 +18,8 @@
typedef INTVAL PIOHANDLE;
typedef off_t PIOOFF_T;
+#define PIO_INVALID_HANDLE -1
+
/* HEADERIZER BEGIN: src/io/unix.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/io_rewiring/include/parrot/io_win32.h
==============================================================================
--- branches/io_rewiring/include/parrot/io_win32.h Sat May 30 12:58:52 2009 (r39261)
+++ branches/io_rewiring/include/parrot/io_win32.h Sat May 30 12:58:57 2009 (r39262)
@@ -16,6 +16,8 @@
typedef Parrot_WIN32_HANDLE PIOHANDLE;
typedef Parrot_OFF_T PIOOFF_T;
+#define PIO_INVALID_HANDLE INVALID_HANDLE_VALUE
+
/* HEADERIZER BEGIN: src/io/win32.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/io_rewiring/src/pmc/filehandle.pmc
==============================================================================
--- branches/io_rewiring/src/pmc/filehandle.pmc Sat May 30 12:58:52 2009 (r39261)
+++ branches/io_rewiring/src/pmc/filehandle.pmc Sat May 30 12:58:57 2009 (r39262)
@@ -31,18 +31,6 @@
#endif
#endif
-#ifdef PIO_OS_WIN32
-# define PIO_INVALID_HANDLE INVALID_HANDLE_VALUE
-#endif
-
-#ifdef PIO_OS_UNIX
-# define PIO_INVALID_HANDLE -1
-#endif
-
-#ifdef PIO_OS_STDIO
-# define PIO_INVALID_HANDLE NULL
-#endif
-
pmclass FileHandle extends Handle need_ext {
ATTR INTVAL flags; /* Filehandle flags */
ATTR STRING *filename; /* The opened path and filename */
More information about the parrot-commits
mailing list