diff options
author | Bert Vermeulen <bert@biot.com> | 2012-01-07 04:18:16 +0100 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2012-01-07 04:18:16 +0100 |
commit | 3e2a9de2adfc73a640fa352fdc1ebc804fc98a69 (patch) | |
tree | 68baa88c970a240d8d8f29f7a147f53527d25bec /module_sigrokdecode.c | |
parent | 0ee4dd54ce134158cd2068866ddc7d32c692d457 (diff) | |
download | libsigrokdecode-3e2a9de2adfc73a640fa352fdc1ebc804fc98a69.tar.gz libsigrokdecode-3e2a9de2adfc73a640fa352fdc1ebc804fc98a69.zip |
expose SRD_OUTPUT_* as symbols in the sigrokdecode module.
Diffstat (limited to 'module_sigrokdecode.c')
-rw-r--r-- | module_sigrokdecode.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/module_sigrokdecode.c b/module_sigrokdecode.c index b3bdafd..9c8c72e 100644 --- a/module_sigrokdecode.c +++ b/module_sigrokdecode.c @@ -220,6 +220,17 @@ PyMODINIT_FUNC PyInit_sigrokdecode(void) if (PyModule_AddObject(mod, "srd_logic", (PyObject *)&srd_logic_type) == -1) return NULL; + /* expose output types as symbols in the sigrokdecode module */ + if(PyModule_AddObject(mod, "SRD_OUTPUT_ANNOTATION", + PyLong_FromLong(SRD_OUTPUT_ANNOTATION)) == -1) + return NULL; + if(PyModule_AddObject(mod, "SRD_OUTPUT_PROTOCOL", + PyLong_FromLong(SRD_OUTPUT_PROTOCOL)) == -1) + return NULL; + if(PyModule_AddObject(mod, "SRD_OUTPUT_BINARY", + PyLong_FromLong(SRD_OUTPUT_BINARY)) == -1) + return NULL; + return mod; } |