diff options
Diffstat (limited to 'plugins/pychrysalide/arch/instriter.c')
-rw-r--r-- | plugins/pychrysalide/arch/instriter.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/pychrysalide/arch/instriter.c b/plugins/pychrysalide/arch/instriter.c index f665cba..9b149fd 100644 --- a/plugins/pychrysalide/arch/instriter.c +++ b/plugins/pychrysalide/arch/instriter.c @@ -33,6 +33,7 @@ #include "processor.h" #include "../access.h" +#include "../helpers.h" @@ -263,7 +264,6 @@ bool ensure_python_instr_iterator_is_registered(void) { PyTypeObject *type; /* Type Python 'InstrIterator' */ PyObject *module; /* Module à recompléter */ - int ret; /* Bilan d'un appel */ type = get_python_instr_iterator_type(); @@ -274,10 +274,7 @@ bool ensure_python_instr_iterator_is_registered(void) module = get_access_to_python_module("pychrysalide.arch"); - Py_INCREF(type); - ret = PyModule_AddObject(module, "InstrIterator", (PyObject *)type); - - if (ret != 0) + if (!register_python_module_object(module, type)) return false; } |