diff --git a/include/eigenpy/eigen-allocator.hpp b/include/eigenpy/eigen-allocator.hpp index 58f95a5cc3967aceb61c8a8399882f0c665beeed..9c02687bce105ad7b584a292b5f180cef6e292bb 100644 --- a/include/eigenpy/eigen-allocator.hpp +++ b/include/eigenpy/eigen-allocator.hpp @@ -106,9 +106,11 @@ namespace eigenpy typedef MatType Type; typedef typename MatType::Scalar Scalar; - static void allocate(PyArrayObject * pyArray, void * storage) + static void allocate(PyArrayObject * pyArray, + bp::converter::rvalue_from_python_storage<MatType> * storage) { - Type * mat_ptr = details::init_matrix_or_array<Type>::run(pyArray,storage); + void * raw_ptr = storage->storage.bytes; + Type * mat_ptr = details::init_matrix_or_array<Type>::run(pyArray,raw_ptr); Type & mat = *mat_ptr; const int pyArray_Type = EIGENPY_GET_PY_ARRAY_TYPE(pyArray);