@@ -56,7 +56,7 @@ class PathIterator
56
56
}
57
57
58
58
m_vertices = Py::Object (vertices_arr, true );
59
- if (PyArray_DIM (m_vertices.ptr (), 1 ) != 2 )
59
+ if (PyArray_DIM ((PyArrayObject*) m_vertices.ptr (), 1 ) != 2 )
60
60
{
61
61
throw Py::ValueError (" Invalid vertices array." );
62
62
}
@@ -71,14 +71,15 @@ class PathIterator
71
71
}
72
72
73
73
m_codes = Py::Object (codes_arr, true );
74
- if (PyArray_DIM (m_codes.ptr (), 0 ) != PyArray_DIM (m_vertices.ptr (), 0 ))
74
+ if (PyArray_DIM ((PyArrayObject*)m_codes.ptr (), 0 ) !=
75
+ PyArray_DIM ((PyArrayObject*)m_vertices.ptr (), 0 ))
75
76
{
76
77
throw Py::ValueError (" Codes array is wrong length" );
77
78
}
78
79
}
79
80
80
81
m_should_simplify = should_simplify_obj.isTrue ();
81
- m_total_vertices = PyArray_DIM (m_vertices.ptr (), 0 );
82
+ m_total_vertices = PyArray_DIM ((PyArrayObject*) m_vertices.ptr (), 0 );
82
83
m_simplify_threshold = Py::Float (simplify_threshold_obj);
83
84
}
84
85
@@ -93,13 +94,13 @@ class PathIterator
93
94
94
95
const size_t idx = m_iterator++;
95
96
96
- char * pair = (char *)PyArray_GETPTR2 (m_vertices.ptr (), idx, 0 );
97
+ char * pair = (char *)PyArray_GETPTR2 ((PyArrayObject*) m_vertices.ptr (), idx, 0 );
97
98
*x = *(double *)pair;
98
- *y = *(double *)(pair + PyArray_STRIDE (m_vertices.ptr (), 1 ));
99
+ *y = *(double *)(pair + PyArray_STRIDE ((PyArrayObject*) m_vertices.ptr (), 1 ));
99
100
100
101
if (!m_codes.isNone ())
101
102
{
102
- return (unsigned )(*(char *)PyArray_GETPTR1 (m_codes.ptr (), idx));
103
+ return (unsigned )(*(char *)PyArray_GETPTR1 ((PyArrayObject*) m_codes.ptr (), idx));
103
104
}
104
105
else
105
106
{
0 commit comments