Mercurial > hg > xemacs-beta
diff src/device-tty.c @ 3092:141c2920ea48
[xemacs-hg @ 2005-11-25 01:41:31 by crestani]
Incremental Garbage Collector
author | crestani |
---|---|
date | Fri, 25 Nov 2005 01:42:08 +0000 |
parents | 3d8143fc88e1 |
children | e34711681f30 |
line wrap: on
line diff
--- a/src/device-tty.c Thu Nov 24 22:51:25 2005 +0000 +++ b/src/device-tty.c Fri Nov 25 01:42:08 2005 +0000 @@ -44,10 +44,26 @@ Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win; +#ifdef NEW_GC +static const struct memory_description tty_device_data_description_1 [] = { + { XD_END } +}; + +DEFINE_LRECORD_IMPLEMENTATION ("tty-device", tty_device, + 1, /*dumpable-flag*/ + 0, 0, 0, 0, 0, + tty_device_data_description_1, + Lisp_Tty_Device); +#endif /* NEW_GC */ + static void allocate_tty_device_struct (struct device *d) { +#ifdef NEW_GC + d->device_data = alloc_lrecord_type (struct tty_device, &lrecord_tty_device); +#else /* not NEW_GC */ d->device_data = xnew_and_zero (struct tty_device); +#endif /* not NEW_GC */ } static void @@ -97,6 +113,7 @@ call0 (Qinit_pre_tty_win); } +#ifndef NEW_GC static void free_tty_device_struct (struct device *d) { @@ -109,6 +126,7 @@ { free_tty_device_struct (d); } +#endif /* not NEW_GC */ #ifdef SIGWINCH @@ -189,6 +207,10 @@ void syms_of_device_tty (void) { +#ifdef NEW_GC + INIT_LRECORD_IMPLEMENTATION (tty_device); +#endif /* NEW_GC */ + DEFSYMBOL (Qinit_pre_tty_win); DEFSYMBOL (Qinit_post_tty_win); } @@ -198,7 +220,9 @@ { /* device methods */ CONSOLE_HAS_METHOD (tty, init_device); +#ifndef NEW_GC CONSOLE_HAS_METHOD (tty, delete_device); +#endif /* not NEW_GC */ #ifdef SIGWINCH CONSOLE_HAS_METHOD (tty, asynch_device_change); #endif /* SIGWINCH */