summaryrefslogtreecommitdiffstats
path: root/gobject/pygparamspec.c
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-07-19 11:29:13 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-07-19 11:29:13 +0000
commitc2d430551d355245c74e8b30ca4796e772f42275 (patch)
tree501c7dd5ef8a0176a3781a7c600c431704f5961b /gobject/pygparamspec.c
parentcfa02147247fa59b82eff91e2058d1488ff438e3 (diff)
downloadpygobject-c2d430551d355245c74e8b30ca4796e772f42275.tar.gz
pygobject-c2d430551d355245c74e8b30ca4796e772f42275.tar.xz
pygobject-c2d430551d355245c74e8b30ca4796e772f42275.zip
Fix, a window is really WITHDRAWN if it's not SHOWN and not ICONIFIED...
* tests/enum.py (EnumTest.testWindowGetState): Fix, a window is really WITHDRAWN if it's not SHOWN and not ICONIFIED... * tests/common.py: Add .. and ../gobject when distcheck isn't ran * gobject/pygenum.c: Use a dict instead of a tuple for __enum_values__, so we can handle negative enum values (eg: GDK_NOTHING) * gobject/pyflags.c: Ditto for __flag_values__ * gobject/pygparamspec.c (pyg_param_spec_getattr): reference count fixing
Diffstat (limited to 'gobject/pygparamspec.c')
-rw-r--r--gobject/pygparamspec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gobject/pygparamspec.c b/gobject/pygparamspec.c
index b515baa..530bb3c 100644
--- a/gobject/pygparamspec.c
+++ b/gobject/pygparamspec.c
@@ -156,6 +156,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
pyclass = (PyObject*)g_type_get_qdata(G_ENUM_CLASS_TYPE(G_PARAM_SPEC_ENUM(self->pspec)->enum_class), quark);
g_assert(pyclass != NULL);
+ Py_INCREF(pyclass);
return pyclass;
}
} else if (!strcmp(attr, "flags_class")) {
@@ -167,6 +168,7 @@ pyg_param_spec_getattr(PyGParamSpec *self, const gchar *attr)
pyclass = (PyObject*)g_type_get_qdata(G_FLAGS_CLASS_TYPE(G_PARAM_SPEC_FLAGS(self->pspec)->flags_class), quark);
g_assert(pyclass != NULL);
+ Py_INCREF(pyclass);
return pyclass;
}
}