summaryrefslogtreecommitdiffstats
path: root/gobject/pygflags.c
diff options
context:
space:
mode:
authorGustavo J. A. M. Carneiro <gjc@src.gnome.org>2006-07-29 13:31:16 +0000
committerGustavo J. A. M. Carneiro <gjc@src.gnome.org>2006-07-29 13:31:16 +0000
commit2ec5c81e5ad177b665d6a915aa814663f75996c0 (patch)
tree397dbf7e16dc81cd3b7bce9c5b4de40339dfaeb5 /gobject/pygflags.c
parent263a8954ef973fb94aafa7c0df039681dbb12d1f (diff)
downloadpygobject-2ec5c81e5ad177b665d6a915aa814663f75996c0.tar.gz
pygobject-2ec5c81e5ad177b665d6a915aa814663f75996c0.tar.xz
pygobject-2ec5c81e5ad177b665d6a915aa814663f75996c0.zip
better debug warnings
Diffstat (limited to 'gobject/pygflags.c')
-rw-r--r--gobject/pygflags.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index 442e332..bfd5128 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -202,7 +202,11 @@ pyg_flags_add (PyObject * module,
int i;
g_return_val_if_fail(typename != NULL, NULL);
- g_return_val_if_fail(g_type_is_a(gtype, G_TYPE_FLAGS), NULL);
+ if (!g_type_is_a(gtype, G_TYPE_FLAGS)) {
+ g_warning("Trying to register gtype '%s' as flags when in fact it is of type '%s'",
+ g_type_name(gtype), g_type_name(G_TYPE_FUNDAMENTAL(gtype)));
+ return NULL;
+ }
state = pyg_gil_state_ensure();