summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/glibext
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-12-12 17:02:49 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-12-12 17:02:49 (GMT)
commitd5b598b14fd4c50847ce536692ded258ba1720ca (patch)
treebee74e8bcdd642bf67103529991be9d587c6d1da /plugins/pychrysalide/glibext
parentedcd7a2e2919ea880f8aaf649cf7ed8f1eabac1a (diff)
Registered basic Python objects in the features namespace.
Diffstat (limited to 'plugins/pychrysalide/glibext')
-rw-r--r--plugins/pychrysalide/glibext/configuration.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/pychrysalide/glibext/configuration.c b/plugins/pychrysalide/glibext/configuration.c
index 18d681f..e74f0a4 100644
--- a/plugins/pychrysalide/glibext/configuration.c
+++ b/plugins/pychrysalide/glibext/configuration.c
@@ -782,9 +782,8 @@ PyTypeObject *get_python_config_param_iterator_type(void)
bool ensure_python_config_param_iterator_is_registered(void)
{
- PyTypeObject *type; /* Type Python 'Cnf...Iter'*/
+ PyTypeObject *type; /* Type Python 'Cnf...Iter' */
PyObject *module; /* Module à recompléter */
- int ret; /* Bilan d'un appel */
type = get_python_config_param_iterator_type();
@@ -797,10 +796,7 @@ bool ensure_python_config_param_iterator_is_registered(void)
if (PyType_Ready(type) != 0)
return false;
- Py_INCREF(type);
- ret = PyModule_AddObject(module, "ConfigParamIterator", (PyObject *)type);
-
- if (ret != 0)
+ if (!register_python_module_object(module, type))
return false;
}