Fix msvc9 compile error

This commit is contained in:
Christoph Gohlke 2019-06-25 17:18:37 -07:00 committed by GitHub
parent c34cefb576
commit afed559e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,8 +133,8 @@ PyPath_Flatten(PyObject* data, double **pxy)
/* Assume the buffer contains floats */
Py_buffer buffer;
if (PyImaging_GetBuffer(data, &buffer) == 0) {
n = buffer.len / (2 * sizeof(float));
float *ptr = (float*) buffer.buf;
n = buffer.len / (2 * sizeof(float));
xy = alloc_array(n);
if (!xy)
return -1;