mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 19:36:38 +03:00
Use ssize_t to store number of elements in buffer
This commit is contained in:
parent
ea570a8c5b
commit
c34cefb576
|
@ -133,7 +133,7 @@ PyPath_Flatten(PyObject* data, double **pxy)
|
||||||
/* Assume the buffer contains floats */
|
/* Assume the buffer contains floats */
|
||||||
Py_buffer buffer;
|
Py_buffer buffer;
|
||||||
if (PyImaging_GetBuffer(data, &buffer) == 0) {
|
if (PyImaging_GetBuffer(data, &buffer) == 0) {
|
||||||
int n = buffer.len / (2 * sizeof(float));
|
n = buffer.len / (2 * sizeof(float));
|
||||||
float *ptr = (float*) buffer.buf;
|
float *ptr = (float*) buffer.buf;
|
||||||
xy = alloc_array(n);
|
xy = alloc_array(n);
|
||||||
if (!xy)
|
if (!xy)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user