Skip to content

Commit c61b0f2

Browse files
committed
Avoid narrowing conversion in image_wrapper on 32-bit.
1 parent c85b029 commit c61b0f2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/_image_wrapper.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,13 +352,12 @@ static PyObject *image_pcolor(PyObject *self, PyObject *args, PyObject *kwds)
352352
numpy::array_view<const float, 1> x;
353353
numpy::array_view<const float, 1> y;
354354
numpy::array_view<const agg::int8u, 3> d;
355-
unsigned int rows;
356-
unsigned int cols;
355+
npy_intp rows, cols;
357356
float bounds[4];
358357
int interpolation;
359358

360359
if (!PyArg_ParseTuple(args,
361-
"O&O&O&II(ffff)i:pcolor",
360+
"O&O&O&nn(ffff)i:pcolor",
362361
&x.converter,
363362
&x,
364363
&y.converter,

0 commit comments

Comments
 (0)