]> sigrok.org Git - libsigrok.git/commitdiff
python: Prevent warning about deprecated NumPy API.
authorMartin Ling <redacted>
Tue, 20 Oct 2015 19:38:37 +0000 (20:38 +0100)
committerMartin Ling <redacted>
Tue, 20 Oct 2015 20:12:29 +0000 (21:12 +0100)
Without this we get:

/usr/include/python2.7/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning
"Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API
NPY_1_7_API_VERSION" [-Wcpp]

As far as I'm aware we're not using any deprecated NumPy C API features.

This fixes part of bug #417.

bindings/python/sigrok/core/classes.i

index 347a7e220c4dfb23cf8588ae9cb65a0c1c19c9d5..49cfba98791443e48c7b0f4fe8d7eec246d7a873 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;