summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/decode.c b/decode.c
index db29494..5289470 100644
--- a/decode.c
+++ b/decode.c
@@ -259,9 +259,9 @@ int sigrokdecode_run_decoder(struct sigrokdecode_decoder *dec,
/* TODO: Error handling. */
py_mod = dec->py_mod;
+ Py_INCREF(py_mod);
py_func = dec->py_func;
-
- /* TODO: Really run Py_DECREF on py_mod/py_func? */
+ Py_INCREF(py_func);
/* Create a Python tuple of size 1. */
if (!(py_args = PyTuple_New(1))) { /* NEWREF */