summaryrefslogtreecommitdiffstats
path: root/gobject/pygflags.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-07-20 11:05:41 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-07-20 11:05:41 +0000
commitd2c71ff53b42afec6bf4ebca3bcf801dce5cfbb2 (patch)
tree8e24537a5847c6c93a0ef7ae12b8cdb2076e1839 /gobject/pygflags.c
parent7a068035003772b1c393c072377ebc8acfb875ae (diff)
downloadpygobject-d2c71ff53b42afec6bf4ebca3bcf801dce5cfbb2.tar.gz
pygobject-d2c71ff53b42afec6bf4ebca3bcf801dce5cfbb2.tar.xz
pygobject-d2c71ff53b42afec6bf4ebca3bcf801dce5cfbb2.zip
Simplify, fix name in exceptions and remove warning.
* gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Simplify, fix name in exceptions and remove warning. * gobject/pygenum.c (pyg_enum_from_gtype): Fall back to int for unregistered enums. * gobject/pygflags.c (pyg_flags_from_gtype): Ditto * gobject/gobjectmodule.c (initgobject): Rename back to MainLoop, MainContext
Diffstat (limited to 'gobject/pygflags.c')
-rw-r--r--gobject/pygflags.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gobject/pygflags.c b/gobject/pygflags.c
index 24d44be..d210850 100644
--- a/gobject/pygflags.c
+++ b/gobject/pygflags.c
@@ -156,7 +156,8 @@ pyg_flags_from_gtype (GType gtype, int value)
g_return_val_if_fail(gtype != G_TYPE_INVALID, NULL);
pyclass = (PyObject*)g_type_get_qdata(gtype, pygflags_class_key);
- g_assert(pyclass != NULL);
+ if (pyclass == NULL)
+ return PyInt_FromLong(value);
values = PyDict_GetItemString(((PyTypeObject *)pyclass)->tp_dict,
"__flags_values__");