[COMMIT GTK] Tell KKCC about some hash tables in the GTK frame object, frame-gtk.c

Aidan Kehoe kehoea at parhasard.net
Fri Aug 26 11:39:34 EDT 2011


Again, another discrete change that shouldn’t affect you, Jeff. 

APPROVE COMMIT GTK

NOTE: This patch has been committed.

# HG changeset patch
# User Aidan Kehoe <kehoea at parhasard.net>
# Date 1314372856 -3600
# Node ID d20ffd0cf85df0423b9ab74f414904e3688cdae4
# Parent  811ef64bb11a5ba4f8b7b899eb4d8260d3603536
Tell KKCC about some hash tables in the GTK frame object, frame-gtk.c

src/ChangeLog.GTK addition:

2011-08-26  Aidan Kehoe	 <kehoea at parhasard.net>

	* frame-gtk.c:
	* frame-gtk.c (gtk_mark_frame):
	For the sake of KKCC, add information on the various weak hash
	tables in gtk_frame to the data description. Otherwise they get
	garbage collected, which is less than optimal.
	Reorder the mark_object calls in gtk_mark_frame() to reflect the
	order of the Lisp_Objects in the structure, to make omitting things
	a little harder to forget.

diff -r 811ef64bb11a -r d20ffd0cf85d src/ChangeLog.GTK
--- a/src/ChangeLog.GTK	Fri Aug 26 15:07:13 2011 +0100
+++ b/src/ChangeLog.GTK	Fri Aug 26 16:34:16 2011 +0100
@@ -1,3 +1,14 @@
+2011-08-26  Aidan Kehoe	 <kehoea at parhasard.net>
+
+	* frame-gtk.c:
+	* frame-gtk.c (gtk_mark_frame):
+	For the sake of KKCC, add information on the various weak hash
+	tables in gtk_frame to the data description. Otherwise they get
+	garbage collected, which is less than optimal.
+	Reorder the mark_object calls in gtk_mark_frame() to reflect the
+	order of the Lisp_Objects in the structure, to make omitting things
+	a little harder to forget.
+
 2011-08-26  Aidan Kehoe  <kehoea at parhasard.net>
 
 	* device-gtk.c:
diff -r 811ef64bb11a -r d20ffd0cf85d src/frame-gtk.c
--- a/src/frame-gtk.c	Fri Aug 26 15:07:13 2011 +0100
+++ b/src/frame-gtk.c	Fri Aug 26 16:34:16 2011 +0100
@@ -89,11 +89,15 @@
 #endif
 
 static const struct memory_description gtk_frame_data_description_1 [] = {
-  { XD_LISP_OBJECT, offsetof (struct gtk_frame, icon_pixmap) },
-  { XD_LISP_OBJECT, offsetof (struct gtk_frame, icon_pixmap_mask) },
   { XD_LISP_OBJECT_ARRAY, offsetof (struct gtk_frame, lisp_visible_widgets),
     3 },
   { XD_LISP_OBJECT, offsetof (struct gtk_frame, menubar_data) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_frame, icon_pixmap) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_frame, icon_pixmap_mask) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_frame, widget_instance_hash_table) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_frame, widget_callback_hash_table) },
+  { XD_LISP_OBJECT, offsetof (struct gtk_frame,
+                              widget_callback_ex_hash_table) },
   { XD_END }
 };
 
@@ -1142,12 +1146,12 @@
 static void
 gtk_mark_frame (struct frame *f)
 {
-  mark_object (FRAME_GTK_ICON_PIXMAP (f));
-  mark_object (FRAME_GTK_ICON_PIXMAP_MASK (f));
-  mark_object (FRAME_GTK_MENUBAR_DATA (f));
   mark_object (FRAME_GTK_LISP_WIDGETS (f)[0]);
   mark_object (FRAME_GTK_LISP_WIDGETS (f)[1]);
   mark_object (FRAME_GTK_LISP_WIDGETS (f)[2]);
+  mark_object (FRAME_GTK_MENUBAR_DATA (f));
+  mark_object (FRAME_GTK_ICON_PIXMAP (f));
+  mark_object (FRAME_GTK_ICON_PIXMAP_MASK (f));
   mark_object (FRAME_GTK_WIDGET_INSTANCE_HASH_TABLE (f));
   mark_object (FRAME_GTK_WIDGET_CALLBACK_HASH_TABLE (f));
   mark_object (FRAME_GTK_WIDGET_CALLBACK_EX_HASH_TABLE (f));


-- 
‘Iodine deficiency was endemic in parts of the UK until, through what has been
described as “an unplanned and accidental public health triumph”, iodine was
added to cattle feed to improve milk production in the 1930s.’
(EN Pearce, Lancet, June 2011)



More information about the XEmacs-Patches mailing list