summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/common/pathname.c
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/common/pathname.c
parentedcd7a2e2919ea880f8aaf649cf7ed8f1eabac1a (diff)
Registered basic Python objects in the features namespace.
Diffstat (limited to 'plugins/pychrysalide/common/pathname.c')
-rw-r--r--plugins/pychrysalide/common/pathname.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/pychrysalide/common/pathname.c b/plugins/pychrysalide/common/pathname.c
index c2d69c6..e07ebe5 100644
--- a/plugins/pychrysalide/common/pathname.c
+++ b/plugins/pychrysalide/common/pathname.c
@@ -36,6 +36,7 @@
#include "../access.h"
+#include "../helpers.h"
@@ -190,7 +191,6 @@ bool ensure_python_pathname_is_registered(void)
{
PyTypeObject *type; /* Type Python pour 'pathname' */
PyObject *module; /* Module à recompléter */
- int ret; /* Bilan d'un appel */
type = get_python_pathname_type();
@@ -203,10 +203,7 @@ bool ensure_python_pathname_is_registered(void)
module = get_access_to_python_module("pychrysalide.common");
- Py_INCREF(type);
- ret = PyModule_AddObject(module, "pathname", (PyObject *)type);
-
- if (ret != 0)
+ if (!register_python_module_object(module, type))
return false;
}