summaryrefslogtreecommitdiff
path: root/module_sigrokdecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'module_sigrokdecode.c')
-rw-r--r--module_sigrokdecode.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/module_sigrokdecode.c b/module_sigrokdecode.c
index a18583b..cb43372 100644
--- a/module_sigrokdecode.c
+++ b/module_sigrokdecode.c
@@ -21,6 +21,12 @@
#include "sigrokdecode-internal.h"
#include "config.h"
+
+/* When initialized, a reference to this module inside the python interpreter
+ * lives here.
+ */
+PyObject *mod_sigrokdecode = NULL;
+
/* lives in type_logic.c */
extern PyTypeObject srd_logic_type;
@@ -236,6 +242,8 @@ PyMODINIT_FUNC PyInit_sigrokdecode(void)
PyLong_FromLong(SRD_OUTPUT_BINARY)) == -1)
return NULL;
+ mod_sigrokdecode = mod;
+
return mod;
}