summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/format
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/format
parentedcd7a2e2919ea880f8aaf649cf7ed8f1eabac1a (diff)
Registered basic Python objects in the features namespace.
Diffstat (limited to 'plugins/pychrysalide/format')
-rw-r--r--plugins/pychrysalide/format/symiter.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/pychrysalide/format/symiter.c b/plugins/pychrysalide/format/symiter.c
index 74a215d..03a0ec8 100644
--- a/plugins/pychrysalide/format/symiter.c
+++ b/plugins/pychrysalide/format/symiter.c
@@ -33,6 +33,7 @@
#include "format.h"
#include "../access.h"
+#include "../helpers.h"
@@ -263,7 +264,6 @@ bool ensure_python_sym_iterator_is_registered(void)
{
PyTypeObject *type; /* Type Python 'SymIterator' */
PyObject *module; /* Module à recompléter */
- int ret; /* Bilan d'un appel */
type = get_python_sym_iterator_type();
@@ -274,10 +274,7 @@ bool ensure_python_sym_iterator_is_registered(void)
module = get_access_to_python_module("pychrysalide.format");
- Py_INCREF(type);
- ret = PyModule_AddObject(module, "SymIterator", (PyObject *)type);
-
- if (ret != 0)
+ if (!register_python_module_object(module, type))
return false;
}