Skip to content

Avoid narrowing conversion in image_wrapper on 32-bit. #10736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/_image_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,13 +352,12 @@ static PyObject *image_pcolor(PyObject *self, PyObject *args, PyObject *kwds)
numpy::array_view<const float, 1> x;
numpy::array_view<const float, 1> y;
numpy::array_view<const agg::int8u, 3> d;
unsigned int rows;
unsigned int cols;
npy_intp rows, cols;
float bounds[4];
int interpolation;

if (!PyArg_ParseTuple(args,
"O&O&O&II(ffff)i:pcolor",
"O&O&O&nn(ffff)i:pcolor",
&x.converter,
&x,
&y.converter,
Expand Down Expand Up @@ -396,13 +395,12 @@ static PyObject *image_pcolor2(PyObject *self, PyObject *args, PyObject *kwds)
numpy::array_view<const double, 1> x;
numpy::array_view<const double, 1> y;
numpy::array_view<const agg::int8u, 3> d;
unsigned int rows;
unsigned int cols;
npy_intp rows, cols;
float bounds[4];
numpy::array_view<const agg::int8u, 1> bg;

if (!PyArg_ParseTuple(args,
"O&O&O&II(ffff)O&:pcolor2",
"O&O&O&nn(ffff)O&:pcolor2",
&x.converter_contiguous,
&x,
&y.converter_contiguous,
Expand Down