diff options
author | Marcus Comstedt <marcus@mc.pp.se> | 2014-07-01 00:07:40 +0200 |
---|---|---|
committer | Bert Vermeulen <bert@biot.com> | 2014-07-08 15:42:44 +0200 |
commit | f6c7eade2b8853b3d525b5cc0402e89ca74c1908 (patch) | |
tree | 8ca350ca3ca7c09e08f986a92c87bd3cf7ad8a55 /libsigrokdecode-internal.h | |
parent | 67ecff568264e0af2cf137af1d0f4edf7a9dcf2e (diff) | |
download | libsigrokdecode-f6c7eade2b8853b3d525b5cc0402e89ca74c1908.tar.gz libsigrokdecode-f6c7eade2b8853b3d525b5cc0402e89ca74c1908.zip |
Remove dependency on Python.h from public API header
This prevents Python.h from being included into client code, where
it can mess things up by e.g. redefining _POSIX_C_SOURCE.
Diffstat (limited to 'libsigrokdecode-internal.h')
-rw-r--r-- | libsigrokdecode-internal.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h index f386cd7..7370410 100644 --- a/libsigrokdecode-internal.h +++ b/libsigrokdecode-internal.h @@ -22,8 +22,21 @@ #ifndef LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H #define LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H +#include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */ #include "libsigrokdecode.h" +/* Custom Python types: */ + +typedef struct { + PyObject_HEAD + struct srd_decoder_inst *di; + uint64_t start_samplenum; + unsigned int itercnt; + uint8_t *inbuf; + uint64_t inbuflen; + PyObject *sample; +} srd_logic; + struct srd_session { int session_id; |