comparison src/frame-x.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 0882ede40b55
children ad2f4ae9895b
comparison
equal deleted inserted replaced
3091:c22d8984148c 3092:141c2920ea48
75 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap) }, 75 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap) },
76 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap_mask) }, 76 { XD_LISP_OBJECT, offsetof (struct x_frame, icon_pixmap_mask) },
77 { XD_END } 77 { XD_END }
78 }; 78 };
79 79
80 #ifdef NEW_GC
81 DEFINE_LRECORD_IMPLEMENTATION ("x-frame", x_frame,
82 1, /*dumpable-flag*/
83 0, 0, 0, 0, 0,
84 x_frame_data_description_1,
85 Lisp_X_Frame);
86 #else /* not NEW_GC */
80 extern const struct sized_memory_description x_frame_data_description; 87 extern const struct sized_memory_description x_frame_data_description;
81 88
82 const struct sized_memory_description x_frame_data_description = { 89 const struct sized_memory_description x_frame_data_description = {
83 sizeof (struct x_frame), x_frame_data_description_1 90 sizeof (struct x_frame), x_frame_data_description_1
84 }; 91 };
92 #endif /* not NEW_GC */
85 93
86 EXFUN (Fx_window_id, 1); 94 EXFUN (Fx_window_id, 1);
87 95
88 96
89 /************************************************************************/ 97 /************************************************************************/
2071 2079
2072 static void 2080 static void
2073 allocate_x_frame_struct (struct frame *f) 2081 allocate_x_frame_struct (struct frame *f)
2074 { 2082 {
2075 /* zero out all slots. */ 2083 /* zero out all slots. */
2084 #ifdef NEW_GC
2085 f->frame_data = alloc_lrecord_type (struct x_frame, &lrecord_x_frame);
2086 #else /* not NEW_GC */
2076 f->frame_data = xnew_and_zero (struct x_frame); 2087 f->frame_data = xnew_and_zero (struct x_frame);
2088 #endif /* not NEW_GC */
2077 2089
2078 /* yeah, except the lisp ones */ 2090 /* yeah, except the lisp ones */
2079 FRAME_X_LAST_MENUBAR_BUFFER (f) = Qnil; 2091 FRAME_X_LAST_MENUBAR_BUFFER (f) = Qnil;
2080 FRAME_X_ICON_PIXMAP (f) = Qnil; 2092 FRAME_X_ICON_PIXMAP (f) = Qnil;
2081 FRAME_X_ICON_PIXMAP_MASK (f) = Qnil; 2093 FRAME_X_ICON_PIXMAP_MASK (f) = Qnil;
2640 FRAME_X_GEOM_FREE_ME_PLEASE (f) = 0; 2652 FRAME_X_GEOM_FREE_ME_PLEASE (f) = 0;
2641 } 2653 }
2642 2654
2643 if (f->frame_data) 2655 if (f->frame_data)
2644 { 2656 {
2657 #ifdef NEW_GC
2658 mc_free (f->frame_data);
2659 #else /* not NEW_GC */
2645 xfree (f->frame_data, void *); 2660 xfree (f->frame_data, void *);
2661 #endif /* not NEW_GC */
2646 f->frame_data = 0; 2662 f->frame_data = 0;
2647 } 2663 }
2648 } 2664 }
2649 2665
2650 static void 2666 static void
2718 /************************************************************************/ 2734 /************************************************************************/
2719 2735
2720 void 2736 void
2721 syms_of_frame_x (void) 2737 syms_of_frame_x (void)
2722 { 2738 {
2739 #ifdef NEW_GC
2740 INIT_LRECORD_IMPLEMENTATION (x_frame);
2741 #endif /* NEW_GC */
2742
2723 DEFSYMBOL (Qoverride_redirect); 2743 DEFSYMBOL (Qoverride_redirect);
2724 DEFSYMBOL (Qx_resource_name); 2744 DEFSYMBOL (Qx_resource_name);
2725 2745
2726 DEFSUBR (Fx_window_id); 2746 DEFSUBR (Fx_window_id);
2727 #ifdef HAVE_CDE 2747 #ifdef HAVE_CDE