mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-09 16:10:48 +03:00
fix PY_SSIZE_T_CLEAN in display.c
This commit is contained in:
parent
1e4d81f160
commit
26cfe04fea
|
@ -22,7 +22,7 @@
|
||||||
* See the README file for information on usage and redistribution.
|
* See the README file for information on usage and redistribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define PY_SSIZE_T_CLEAN
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
|
||||||
#include "libImaging/Imaging.h"
|
#include "libImaging/Imaging.h"
|
||||||
|
@ -196,7 +196,7 @@ static PyObject*
|
||||||
_frombytes(ImagingDisplayObject* display, PyObject* args)
|
_frombytes(ImagingDisplayObject* display, PyObject* args)
|
||||||
{
|
{
|
||||||
char* ptr;
|
char* ptr;
|
||||||
int bytes;
|
Py_ssize_t bytes;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "y#:frombytes", &ptr, &bytes)) {
|
if (!PyArg_ParseTuple(args, "y#:frombytes", &ptr, &bytes)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -777,7 +777,7 @@ PyImaging_DrawWmf(PyObject* self, PyObject* args)
|
||||||
char* ptr;
|
char* ptr;
|
||||||
|
|
||||||
char* data;
|
char* data;
|
||||||
int datasize;
|
Py_ssize_t datasize;
|
||||||
int width, height;
|
int width, height;
|
||||||
int x0, y0, x1, y1;
|
int x0, y0, x1, y1;
|
||||||
if (!PyArg_ParseTuple(args, "y#(ii)(iiii):_load", &data, &datasize,
|
if (!PyArg_ParseTuple(args, "y#(ii)(iiii):_load", &data, &datasize,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user