glib r7256 - trunk/gobject



Author: tml
Date: Sun Jul 27 15:58:48 2008
New Revision: 7256
URL: http://svn.gnome.org/viewvc/glib?rev=7256&view=rev

Log:
2008-07-27  Tor Lillqvist  <tml novell com>

	* gtype.h
	* gtype.c: Revert my change from 2008-07-24. No G_TYPE_FORMAT is
	needed. Just use G_GSIZE_FORMAT always when printing GType values.



Modified:
   trunk/gobject/ChangeLog
   trunk/gobject/gtype.c
   trunk/gobject/gtype.h

Modified: trunk/gobject/gtype.c
==============================================================================
--- trunk/gobject/gtype.c	(original)
+++ trunk/gobject/gtype.c	Sun Jul 27 15:58:48 2008
@@ -2355,7 +2355,7 @@
   if ((type_id & TYPE_ID_MASK) ||
       type_id > G_TYPE_FUNDAMENTAL_MAX)
     {
-      g_warning ("attempt to register fundamental type `%s' with invalid type id (%" G_TYPE_FORMAT ")",
+      g_warning ("attempt to register fundamental type `%s' with invalid type id (%" G_GSIZE_FORMAT ")",
 		 type_name,
 		 type_id);
       return 0;
@@ -3937,7 +3937,7 @@
     return vtable;
   
   if (!node)
-    g_warning (G_STRLOC ": type id `%" G_TYPE_FORMAT "' is invalid", type);
+    g_warning (G_STRLOC ": type id `%" G_GSIZE_FORMAT "' is invalid", type);
   if (!has_refed_data)
     g_warning ("can't peek value table for type `%s' which is not currently referenced",
 	       type_descriptive_name_I (type));

Modified: trunk/gobject/gtype.h
==============================================================================
--- trunk/gobject/gtype.h	(original)
+++ trunk/gobject/gtype.h	Sun Jul 27 15:58:48 2008
@@ -365,10 +365,8 @@
  */
 #if     GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined __cplusplus
 typedef gsize                           GType;
-#define G_TYPE_FORMAT G_GSIZE_FORMAT
 #else   /* for historic reasons, C++ links against gulong GTypes */
 typedef gulong                          GType;
-#define G_TYPE_FORMAT "lu"
 #endif
 typedef struct _GValue                  GValue;
 typedef union  _GTypeCValue             GTypeCValue;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]