fix PY_SSIZE_T_CLEAN in display.c

This commit is contained in:
nulano 2020-10-14 20:52:16 +01:00
parent 1e4d81f160
commit 26cfe04fea

View File

@ -22,7 +22,7 @@
* See the README file for information on usage and redistribution.
*/
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#include "libImaging/Imaging.h"
@ -196,7 +196,7 @@ static PyObject*
_frombytes(ImagingDisplayObject* display, PyObject* args)
{
char* ptr;
int bytes;
Py_ssize_t bytes;
if (!PyArg_ParseTuple(args, "y#:frombytes", &ptr, &bytes)) {
return NULL;
@ -777,7 +777,7 @@ PyImaging_DrawWmf(PyObject* self, PyObject* args)
char* ptr;
char* data;
int datasize;
Py_ssize_t datasize;
int width, height;
int x0, y0, x1, y1;
if (!PyArg_ParseTuple(args, "y#(ii)(iiii):_load", &data, &datasize,