diff options
Diffstat (limited to 'plugins/pychrysalide/common/pathname.c')
-rw-r--r-- | plugins/pychrysalide/common/pathname.c | 7 |
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; } |