diff src/console-stream.c @ 5118:e0db3c197671 ben-lisp-object

merge up to latest default branch, doesn't compile yet
author Ben Wing <ben@xemacs.org>
date Sat, 26 Dec 2009 21:18:49 -0600
parents d674024a8674
children d1247f3cc363
line wrap: on
line diff
--- a/src/console-stream.c	Sat Dec 26 00:20:27 2009 -0600
+++ b/src/console-stream.c	Sat Dec 26 21:18:49 2009 -0600
@@ -53,9 +53,15 @@
   { XD_END }
 };
 
+#ifdef NEW_GC
+DEFINE_DUMPABLE_INTERNAL_LISP_OBJECT ("stream-console", stream_console,
+				      0, stream_console_data_description_1,
+				      Lisp_Stream_Console);
+#else /* not NEW_GC */
 const struct sized_memory_description stream_console_data_description = {
   sizeof (struct stream_console), stream_console_data_description_1
 };
+#endif /* not NEW_GC */
 
 static void
 stream_init_console (struct console *con, Lisp_Object UNUSED (params))
@@ -63,8 +69,14 @@
   Lisp_Object tty = CONSOLE_CONNECTION (con);
   struct stream_console *stream_con;
 
+#ifdef NEW_GC
+  if (CONSOLE_STREAM_DATA (con) == NULL)
+    CONSOLE_STREAM_DATA (con) = alloc_lrecord_type (struct stream_console,
+						    &lrecord_stream_console);
+#else /* not NEW_GC */
   if (CONSOLE_STREAM_DATA (con) == NULL)
     CONSOLE_STREAM_DATA (con) = xnew_and_zero (struct stream_console);
+#endif /* not NEW_GC */
 
   stream_con = CONSOLE_STREAM_DATA (con);
 
@@ -123,7 +135,9 @@
       if (stream_con->in != stdin)
 	retry_fclose (stream_con->in);
 
+#ifndef NEW_GC
       xfree (stream_con, struct stream_console *);
+#endif /* not NEW_GC */
       CONSOLE_STREAM_DATA (con) = NULL;
     }
 }