X-Git-Url: https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=blobdiff_plain;f=libsigrokdecode-internal.h;h=e9aef649b93697e430cc3586c2298b9c613e3c7c;hp=1fe19ca1ae22158d8aa224dcc9bd02010f190bb3;hb=1483fb220ce56405433aee298d1637f6b041ac2b;hpb=4467372a2e39bb72648eebbb96934147681110c2 diff --git a/libsigrokdecode-internal.h b/libsigrokdecode-internal.h index 1fe19ca..e9aef64 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; @@ -34,10 +47,8 @@ struct srd_session { GSList *callbacks; }; - /* srd.c */ SRD_PRIV int srd_decoder_searchpath_add(const char *path); -SRD_PRIV gboolean srd_check_init(void); /* session.c */ SRD_PRIV int session_is_valid(struct srd_session *sess);