]> sigrok.org Git - libsigrok.git/blobdiff - bindings/python/sigrok/core/classes.i
SWIG: Declare template specialisations for containers before typemaps.
[libsigrok.git] / bindings / python / sigrok / core / classes.i
index 347a7e220c4dfb23cf8588ae9cb65a0c1c19c9d5..9dd34ac61caaac6a95c31db812a83b8250e25b2a 100644 (file)
@@ -47,6 +47,7 @@ which provides access to the error code and description."
 %{
 #include <stdio.h>
 #include <pygobject.h>
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
 #include <numpy/arrayobject.h>
 
 PyObject *PyGObject_lib;
@@ -82,6 +83,8 @@ typedef guint pyg_flags_type;
     import_array();
 %}
 
+%include "../../../swig/templates.i"
+
 /* Map file objects to file descriptors. */
 %typecheck(SWIG_TYPECHECK_POINTER) int fd {
     $1 = (PyObject_AsFileDescriptor($input) != -1);