]> sigrok.org Git - libsigrokdecode.git/blobdiff - libsigrokdecode-internal.h
Remove dependency on Python.h from public API header
[libsigrokdecode.git] / libsigrokdecode-internal.h
index f386cd70c0eeba34e267bca78a2a19a69cd0951c..73704107022efb415fbc21e082358d5feec47c88 100644 (file)
 #ifndef LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
 #define LIBSIGROKDECODE_LIBSIGROKDECODE_INTERNAL_H
 
 #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"
 
 #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;
 
 struct srd_session {
        int session_id;