summaryrefslogtreecommitdiff
path: root/gi/pygenum.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:23 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-07-12 08:46:27 +0900
commit392945d666d2cfb31a844826a72b1eb65a52546f (patch)
treea21354051734cbace4e92d6b10c8fa8cd2721dda /gi/pygenum.c
parent4723e0bb24cc41607e5af3bb7036855fa767df0b (diff)
downloadpygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.gz
pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.tar.bz2
pygobject2-392945d666d2cfb31a844826a72b1eb65a52546f.zip
Imported Upstream version 3.25.1
Change-Id: I31412b37aa390505e71295f3a2c2e3cf2ba88b41 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/pygenum.c')
-rw-r--r--gi/pygenum.c10
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;
}