diff options
Diffstat (limited to 'gi/pygenum.c')
-rw-r--r-- | gi/pygenum.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gi/pygenum.c b/gi/pygenum.c index cea9c0f..6897d53 100644 --- a/gi/pygenum.c +++ b/gi/pygenum.c @@ -165,7 +165,7 @@ pyg_enum_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) * values might not have been that good", but we need to keep * backward compatibility. */ - if (!PyDict_Check(values) || PyDict_Size(values) > eclass->n_values) { + if (!PyDict_Check(values) || (gsize)PyDict_Size(values) > eclass->n_values) { PyErr_SetString(PyExc_TypeError, "__enum_values__ badly formed"); Py_DECREF(values); g_type_class_unref(eclass); @@ -235,7 +235,7 @@ pyg_enum_add (PyObject * module, PyGILState_STATE state; PyObject *instance_dict, *stub, *values, *o; GEnumClass *eclass; - int i; + guint i; g_return_val_if_fail(typename != NULL, NULL); if (!g_type_is_a (gtype, G_TYPE_ENUM)) { @@ -244,7 +244,7 @@ pyg_enum_add (PyObject * module, return NULL; } - state = pyglib_gil_state_ensure(); + state = PyGILState_Ensure(); /* Create a new type derived from GEnum. This is the same as: * >>> stub = type(typename, (GEnum,), {}) @@ -256,7 +256,7 @@ pyg_enum_add (PyObject * module, Py_DECREF(instance_dict); if (!stub) { PyErr_SetString(PyExc_RuntimeError, "can't create const"); - pyglib_gil_state_release(state); + PyGILState_Release(state); return NULL; } @@ -309,7 +309,7 @@ pyg_enum_add (PyObject * module, g_type_class_unref(eclass); - pyglib_gil_state_release(state); + PyGILState_Release(state); return stub; } |