diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-12 17:02:49 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-12 17:02:49 (GMT) |
commit | d5b598b14fd4c50847ce536692ded258ba1720ca (patch) | |
tree | bee74e8bcdd642bf67103529991be9d587c6d1da /plugins/pychrysalide/common/fnv1a.c | |
parent | edcd7a2e2919ea880f8aaf649cf7ed8f1eabac1a (diff) |
Registered basic Python objects in the features namespace.
Diffstat (limited to 'plugins/pychrysalide/common/fnv1a.c')
-rw-r--r-- | plugins/pychrysalide/common/fnv1a.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/pychrysalide/common/fnv1a.c b/plugins/pychrysalide/common/fnv1a.c index 759c7ea..5caad48 100644 --- a/plugins/pychrysalide/common/fnv1a.c +++ b/plugins/pychrysalide/common/fnv1a.c @@ -32,6 +32,7 @@ #include "../access.h" +#include "../helpers.h" @@ -130,9 +131,8 @@ PyTypeObject *get_python_fnv1a_type(void) bool ensure_python_fnv1a_is_registered(void) { - PyTypeObject *type; /* Type Python pour 'fnv1a' */ + PyTypeObject *type; /* Type Python pour 'fnv1a' */ PyObject *module; /* Module à recompléter */ - int ret; /* Bilan d'un appel */ type = get_python_fnv1a_type(); @@ -145,10 +145,7 @@ bool ensure_python_fnv1a_is_registered(void) module = get_access_to_python_module("pychrysalide.common"); - Py_INCREF(type); - ret = PyModule_AddObject(module, "fnv1a", (PyObject *)type); - - if (ret != 0) + if (!register_python_module_object(module, type)) return false; } |