]> sigrok.org Git - libsigrokdecode.git/blobdiff - libsigrokdecode-internal.h
uart/i2cfilter: Don't check multiple-choice options.
[libsigrokdecode.git] / libsigrokdecode-internal.h
index 8fd9e529dafe374ed4cc73ed51e417253a5d8a66..73704107022efb415fbc21e082358d5feec47c88 100644 (file)
 #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;
 
@@ -61,13 +74,16 @@ SRD_PRIV int srd_info(const char *format, ...);
 SRD_PRIV int srd_warn(const char *format, ...);
 SRD_PRIV int srd_err(const char *format, ...);
 
+/* module_sigrokdecode.c */
+PyMODINIT_FUNC PyInit_sigrokdecode(void);
+
 /* util.c */
 SRD_PRIV int py_attr_as_str(const PyObject *py_obj, const char *attr,
         char **outstr);
 SRD_PRIV int py_dictitem_as_str(const PyObject *py_obj, const char *key,
         char **outstr);
 SRD_PRIV int py_str_as_str(const PyObject *py_str, char **outstr);
-SRD_PRIV int py_strlist_to_char(const PyObject *py_strlist, char ***outstr);
+SRD_PRIV int py_strseq_to_char(const PyObject *py_strseq, char ***outstr);
 
 /* exception.c */
 SRD_PRIV void srd_exception_catch(const char *format, ...);