From f6c7eade2b8853b3d525b5cc0402e89ca74c1908 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Tue, 1 Jul 2014 00:07:40 +0200 Subject: 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. --- libsigrokdecode-internal.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'libsigrokdecode-internal.h') 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 /* 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; -- cgit v1.2.3-70-g09d2