The attached patch produces the following error:

g++ -c -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -pthread -g -I . -I .. -I
/usr/include -I /usr/include/OpenEXR -I /usr/include -I /usr/include
-DOPENVDB_USE_LOG4CPLUS -I . -fPIC -I python -I /usr/include/python2.7
-I /usr/include/python2.7 -I
/usr/share/pyshared/numpy/core/include/numpy/ -I
/usr/lib/python2.7/dist-packages/numpy/core/include/numpy/
-DPY_OPENVDB_USE_NUMPY -o python/pyMetadata.o python/pyMetadata.cc
In file included from python/pyFloatGrid.cc:35:0:
python/pyGrid.h: In constructor
'pyGrid::CopyOpBase<GridType>::CopyOpBase(bool, GridType&,
boost::python::api::object, boost::python::api::object,
boost::python::api::object)':
python/pyGrid.h:764:66: error: cannot convert 'PyObject* {aka
_object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument
'1' to 'PyArray_Descr* PyArray_DESCR(PyArrayObject*)'
         const PyArray_Descr* dtype = PyArray_DESCR(arrayObj.ptr());
                                                                  ^
python/pyGrid.h:774:45: error: cannot convert 'PyObject* {aka
_object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument
'1' to 'void* PyArray_DATA(PyArrayObject*)'
         mArray = PyArray_DATA(arrayObj.ptr());
                                             ^
In file included from python/pyIntGrid.cc:34:0:
python/pyGrid.h: In constructor
'pyGrid::CopyOpBase<GridType>::CopyOpBase(bool, GridType&,
boost::python::api::object, boost::python::api::object,
boost::python::api::object)':
python/pyGrid.h:764:66: error: cannot convert 'PyObject* {aka
_object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument
'1' to 'PyArray_Descr* PyArray_DESCR(PyArrayObject*)'
         const PyArray_Descr* dtype = PyArray_DESCR(arrayObj.ptr());
                                                                  ^
python/pyGrid.h:774:45: error: cannot convert 'PyObject* {aka
_object*}' to 'PyArrayObject* {aka tagPyArrayObject*}' for argument
'1' to 'void* PyArray_DATA(PyArrayObject*)'
         mArray = PyArray_DATA(arrayObj.ptr());
                                             ^
Makefile:686: recipe for target 'python/pyFloatGrid.o' failed
make[2]: *** [python/pyFloatGrid.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Makefile:686: recipe for target 'python/pyIntGrid.o' failed
make[2]: *** [python/pyIntGrid.o] Error 1
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 openvdb (2.3.0-1) unstable; urgency=low
 .
   * New release
   * Build with log4cplus
Author: Mathieu Malaterre <[email protected]>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- openvdb-2.3.0.orig/python/pyGrid.h
+++ openvdb-2.3.0/python/pyGrid.h
@@ -38,6 +38,7 @@
 #include <boost/python.hpp>
 #include <boost/type_traits/remove_const.hpp>
 #ifdef PY_OPENVDB_USE_NUMPY
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
 #include <arrayobject.h> // for PyArray_DATA()
 #endif
 #include "openvdb/openvdb.h"

Reply via email to