Commits

Jeff Sparkes committed 00d97b3

Use GType instead of guint for types.

* gtk-xemacs.h: gtk_xemacs_get_type now returns GType.
* gtk-xemacs.c (gtk_xemacs_get_type): Use GType instead of guint,
patch from Stephen Turnbull.
* ui-gtk.c (Fg_type_from_name): Use GType.

Comments (0)

Files changed (4)

src/ChangeLog.GTK

 2013-11-20  Jeff Sparkes  <jsparkes@gmail.com>
 
+	* gtk-xemacs.h: gtk_xemacs_get_type ow returns GType.
+	* gtk-xemacs.c (gtk_xemacs_get_type): Use GType instead of guint,
+	patch from Stephen Turnbull.
+	* ui-gtk.c (Fg_type_from_name): Use GType.
+
 	* event-gtk.c (emacs_gtk_drain_queue): Use gdk_events_pending.  I
 	did not read the comment.
 
 static gint gtk_xemacs_expose		(GtkWidget *widget, GdkEventExpose *event);
 #endif
 
-guint
+GType
 gtk_xemacs_get_type (void)
 {
-  static guint xemacs_type = 0;
+  static GType xemacs_type = G_TYPE_INVALID;
 
-  if (!xemacs_type)
+  if (xemacs_type == G_TYPE_INVALID)
     {
       xemacs_type =
         g_type_register_static_simple (GTK_TYPE_FIXED,
                                        (GTypeFlags) 0);
     }
 
+  assert (xemacs_type != G_TYPE_INVALID);
   return xemacs_type;
 }
 
   GtkFixedClass parent_class;
 };
 
-guint gtk_xemacs_get_type (void);
+GType gtk_xemacs_get_type (void);
 GtkWidget *gtk_xemacs_new (struct frame *f);
 
 END_C_DECLS
 */
        (type_name))
 {
-  guint type = G_TYPE_NONE;
-  
+  GType type = G_TYPE_INVALID;
+
   if (SYMBOLP (type_name))
     type_name = Fsymbol_name (type_name);
   CHECK_STRING (type_name);