*/
#include "config.h"
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include <glib.h>
/**
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <stdarg.h>
#include <glib.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <glib.h>
#include <inttypes.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"
+/* 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;
#ifndef LIBSIGROKDECODE_SIGROKDECODE_H
#define LIBSIGROKDECODE_SIGROKDECODE_H
-#include <Python.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
#include <stdint.h>
#include <glib.h>
GSList *options;
/** Python module. */
- PyObject *py_mod;
+ void *py_mod;
/** sigrokdecode.Decoder class. */
- PyObject *py_dec;
+ void *py_dec;
};
/**
struct srd_decoder_inst {
struct srd_decoder *decoder;
struct srd_session *sess;
- PyObject *py_inst;
+ void *py_inst;
char *inst_id;
GSList *pd_output;
int dec_num_channels;
void *cb_data;
};
-/* 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;
-
-
/* srd.c */
SRD_API int srd_init(const char *path);
SRD_API int srd_exit(void);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include <stdarg.h>
#include <stdio.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
/** @cond PRIVATE */
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <inttypes.h>
#include <glib.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <glib.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <Python.h>
#include "../libsigrokdecode.h"
#include <libsigrok/libsigrok.h>
#include <stdlib.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <inttypes.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
#include <inttypes.h>
#include <string.h>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "libsigrokdecode.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
-#include "libsigrokdecode-internal.h"
+#include "libsigrokdecode-internal.h" /* First, so we avoid a _POSIX_C_SOURCE warning. */
+#include "libsigrokdecode.h"
#include "config.h"
/**