diff options
author | Bert Vermeulen <bert@biot.com> | 2012-01-15 03:58:27 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2012-01-15 04:03:42 +0100 |
commit | 451680f192b97d652fb02186f5201efa0d668a2a (patch) | |
tree | 8a7330e084d2bb2027e2e288138f5e19645bd487 /module_sigrokdecode.c | |
parent | f8e458577f72a5b13fa83b6cd3675a7eefc83072 (diff) | |
download | libsigrokdecode-451680f192b97d652fb02186f5201efa0d668a2a.tar.gz libsigrokdecode-451680f192b97d652fb02186f5201efa0d668a2a.zip |
srd: clean up module loading/unloading, and the decoder struct
PDs are now checked for a proper Decoder object, with at least the
required attributes.
The author, long_desc and func attributes in the decoder object are gone.
Diffstat (limited to 'module_sigrokdecode.c')
-rw-r--r-- | module_sigrokdecode.c | 8 |
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; } |