diff options
Diffstat (limited to 'plugins/pychrysalide/helpers.c')
-rw-r--r-- | plugins/pychrysalide/helpers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/pychrysalide/helpers.c b/plugins/pychrysalide/helpers.c index f744475..48b805c 100644 --- a/plugins/pychrysalide/helpers.c +++ b/plugins/pychrysalide/helpers.c @@ -434,6 +434,8 @@ bool register_python_module_methods(PyObject *module, PyMethodDef *defs) if (result) { + Py_INCREF(item); + ret = PyDict_SetItemString(features_dict, iter->ml_name, item); result = (ret == 0); assert(result); @@ -483,6 +485,8 @@ static bool include_python_type_into_features(PyObject *dict, PyTypeObject *type result = (item != NULL); assert(result); + Py_INCREF(item); + ret = PyDict_SetItemString(features_dict, name, item); result = (ret == 0); assert(result); |