Author: allison
Date: Sun Nov 30 21:05:42 2008
New Revision: 33404
Modified:
branches/pdd22io_part2/src/io/core.c
Log:
[pdd22io] Move the mark function for the STDIN, STDOUT, and STDERR PMCs into
the new I/O code.
Modified: branches/pdd22io_part2/src/io/core.c
==============================================================================
--- branches/pdd22io_part2/src/io/core.c (original)
+++ branches/pdd22io_part2/src/io/core.c Sun Nov 30 21:05:42 2008
@@ -30,7 +30,7 @@
interp->piodata->table[PIO_STD*_FILENO].
*/
-/* PIOOFF_T piooffsetzero; */
+PIOOFF_T piooffsetzero;
/*
@@ -104,6 +104,34 @@
/*
+=item C<void Parrot_IOData_mark>
+
+Called from C<trace_active_PMCs()> to mark the IO data live.
+
+=cut
+
+*/
+
+PARROT_EXPORT
+void
+Parrot_IOData_mark(PARROT_INTERP, ARGIN(ParrotIOData *piodata))
+{
+ INTVAL i;
+ ParrotIOTable table = piodata->table;
+
+ /* this was i < PIO_NR_OPEN, but only standard handles 0..2 need
+ * to be kept alive AFAIK -leo
+ */
+ for (i = 0; i < 3; i++) {
+ if (table[i]) {
+ pobject_lives(interp, (PObj *)table[i]);
+ }
+ }
+}
+
+
+/*
+
=back
=head1 SEE ALSO