Mercurial > hg > xemacs-beta
diff src/frame-gtk.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 | dbd2a866e38a |
children | 3ef0aaf3dc34 |
line wrap: on
line diff
--- a/src/frame-gtk.c Thu Nov 24 22:51:25 2005 +0000 +++ b/src/frame-gtk.c Fri Nov 25 01:42:08 2005 +0000 @@ -102,11 +102,19 @@ { XD_END } }; +#ifdef NEW_GC +DEFINE_LRECORD_IMPLEMENTATION ("gtk-frame", gtk_frame, + 1, /*dumpable-flag*/ + 0, 0, 0, 0, 0, + gtk_frame_data_description_1, + Lisp_Gtk_Frame); +#else /* not NEW_GC */ extern const struct sized_memory_description gtk_frame_data_description; const struct sized_memory_description gtk_frame_data_description = { sizeof (struct gtk_frame), gtk_frame_data_description_1 }; +#endif /* not NEW_GC */ /************************************************************************/ @@ -966,7 +974,11 @@ int i; /* zero out all slots. */ +#ifdef NEW_GC + f->frame_data = alloc_lrecord_type (struct gtk_frame, &lrecord_gtk_frame); +#else /* not NEW_GC */ f->frame_data = xnew_and_zero (struct gtk_frame); +#endif /* not NEW_GC */ /* yeah, except the lisp ones */ FRAME_GTK_ICON_PIXMAP (f) = Qnil; @@ -1342,7 +1354,11 @@ if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f)) xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *); +#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; } @@ -1447,6 +1463,10 @@ void syms_of_frame_gtk (void) { +#ifdef NEW_GC + INIT_LRECORD_IMPLEMENTATION (gtk_frame); +#endif /* NEW_GC */ + DEFSYMBOL (Qtext_widget); DEFSYMBOL (Qcontainer_widget); DEFSYMBOL (Qshell_widget);