Mercurial > hg > xemacs-beta
diff src/frame-msw.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 | d305f4207861 |
children | 229bd619740a |
line wrap: on
line diff
--- a/src/frame-msw.c Thu Nov 24 22:51:25 2005 +0000 +++ b/src/frame-msw.c Fri Nov 25 01:42:08 2005 +0000 @@ -92,11 +92,19 @@ { XD_END } }; +#ifdef NEW_GC +DEFINE_LRECORD_IMPLEMENTATION ("mswindows-frame", mswindows_frame, + 1, /*dumpable-flag*/ + 0, 0, 0, 0, 0, + mswindows_frame_data_description_1, + Lisp_Mswindows_Frame); +#else /* not NEW_GC */ extern const struct sized_memory_description mswindows_frame_data_description; const struct sized_memory_description mswindows_frame_data_description = { sizeof (struct mswindows_frame), mswindows_frame_data_description_1 }; +#endif /* not NEW_GC */ /*---------------------------------------------------------------------*/ /*----- DISPLAY FRAME -----*/ @@ -165,7 +173,12 @@ if (!NILP (height)) CHECK_INT (height); +#ifdef NEW_GC + f->frame_data = alloc_lrecord_type (struct mswindows_frame, + &lrecord_mswindows_frame); +#else /* not NEW_GC */ f->frame_data = xnew_and_zero (struct mswindows_frame); +#endif /* not NEW_GC */ FRAME_MSWINDOWS_TARGET_RECT (f) = xnew_and_zero (XEMACS_RECT_WH); FRAME_MSWINDOWS_TARGET_RECT (f)->left = NILP (left) ? -1 : abs (XINT (left)); @@ -340,7 +353,11 @@ #endif ReleaseDC (FRAME_MSWINDOWS_HANDLE (f), FRAME_MSWINDOWS_DC (f)); DestroyWindow (FRAME_MSWINDOWS_HANDLE (f)); +#ifdef NEW_GC + mc_free (f->frame_data); +#else /* not NEW_GC */ xfree (f->frame_data, void *); +#endif /* not NEW_GC */ } f->frame_data = 0; } @@ -1185,6 +1202,9 @@ void syms_of_frame_mswindows (void) { +#ifdef NEW_GC + INIT_LRECORD_IMPLEMENTATION (mswindows_frame); +#endif /* NEW_GC */ } void