fix standard type macros.
authorTim Janik <timj@gtk.org>
Tue, 13 Nov 2001 19:02:40 +0000 (19:02 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 13 Nov 2001 19:02:40 +0000 (19:02 +0000)
Tue Nov 13 20:02:47 2001  Tim Janik  <timj@gtk.org>

        * gparam.h: fix standard type macros.

gobject/ChangeLog
gobject/gparam.h

index d344bf5..8874139 100644 (file)
@@ -1,3 +1,7 @@
+Tue Nov 13 20:02:47 2001  Tim Janik  <timj@gtk.org>
+
+       * gparam.h: fix standard type macros.
+
 Wed Nov  7 00:56:00 2001  Tim Janik  <timj@gtk.org>
 
        * gclosure.h: provide G_CLOSURE_N_NOTIFIERS() for people that need
index 8d6ebe1..02784af 100644 (file)
 
 G_BEGIN_DECLS
 
-/* --- type macros --- */
+/* --- standard type macros --- */
 #define G_TYPE_IS_PARAM(type)          (G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
-#define G_PARAM_SPEC_TYPE(pspec)       (G_TYPE_FROM_INSTANCE (pspec))
-#define G_PARAM_SPEC_TYPE_NAME(pspec)  (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
 #define G_PARAM_SPEC(pspec)            (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
 #define G_IS_PARAM_SPEC(pspec)         (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM))
+#define G_PARAM_SPEC_CLASS(pclass)      (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
+#define G_IS_PARAM_SPEC_CLASS(pclass)   (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
 #define G_PARAM_SPEC_GET_CLASS(pspec)  (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
+
+
+/* --- convenience macros --- */
+#define G_PARAM_SPEC_TYPE(pspec)       (G_TYPE_FROM_INSTANCE (pspec))
+#define G_PARAM_SPEC_TYPE_NAME(pspec)  (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
 #define        G_PARAM_SPEC_VALUE_TYPE(pspec)  (G_PARAM_SPEC (pspec)->value_type)
 #define G_VALUE_HOLDS_PARAM(value)     (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))