From 207489d4171eb275fe0c2b54cfcf092bdba6406a Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Wed, 28 Jul 2004 14:01:03 +0000 Subject: If we're on python 2.3, also check for PyBool_Type. * gobject/pygtype.c (pyg_type_from_object): If we're on python 2.3, also check for PyBool_Type. * tests/gtype.py (GTypeTest.testBoolType): New test --- gobject/pygtype.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gobject/pygtype.c') diff --git a/gobject/pygtype.c b/gobject/pygtype.c index 23e3066..edf01f0 100644 --- a/gobject/pygtype.c +++ b/gobject/pygtype.c @@ -133,6 +133,10 @@ pyg_type_from_object(PyObject *obj) if (tp == &PyInt_Type) return G_TYPE_INT; +#if PY_VERSION_HEX >= 0x020300f0 + else if (tp == &PyBool_Type) + return G_TYPE_BOOLEAN; +#endif else if (tp == &PyLong_Type) return G_TYPE_LONG; else if (tp == &PyFloat_Type) -- cgit