diff options
Diffstat (limited to 'plugins/pychrysa/core/module.c')
-rw-r--r-- | plugins/pychrysa/core/module.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/plugins/pychrysa/core/module.c b/plugins/pychrysa/core/module.c index 489f173..a866c05 100644 --- a/plugins/pychrysa/core/module.c +++ b/plugins/pychrysa/core/module.c @@ -25,6 +25,9 @@ #include "module.h" +#include <assert.h> + + #include "params.h" @@ -64,27 +67,22 @@ bool add_core_module_to_python_module(PyObject *super) if (module == NULL) return false; ret = PyState_AddModule(super, &py_chrysalide_core_module); - if (ret != 0) goto acmtpm_exit; + if (ret != 0) goto loading_failed; ret = _PyImport_FixupBuiltin(module, "pychrysalide.core"); - if (ret != 0) goto acmtpm_exit; + if (ret != 0) goto loading_failed; Py_INCREF(module); ret = PyModule_AddObject(super, "core", module); - if (ret != 0) goto acmtpm_exit; + if (ret != 0) goto loading_failed; result = true; result &= register_python_params(module); - acmtpm_exit: - - if (!result) - { - printf("something went wrong in %s...\n", __FUNCTION__); - /* ... */ + loading_failed: - } + assert(result); return result; |