mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-05-29 10:13:09 +03:00
py2.6 support
This commit is contained in:
parent
fa81287f2c
commit
71333fcdbe
2
decode.c
2
decode.c
|
@ -938,7 +938,7 @@ _imaging_tell_pyFd(PyObject *fd)
|
||||||
Py_ssize_t location;
|
Py_ssize_t location;
|
||||||
|
|
||||||
result = PyObject_CallMethod(fd, "tell", NULL);
|
result = PyObject_CallMethod(fd, "tell", NULL);
|
||||||
location = PyLong_AsSsize_t(result);
|
location = PyInt_AsSsize_t(result);
|
||||||
|
|
||||||
Py_DECREF(result);
|
Py_DECREF(result);
|
||||||
return location;
|
return location;
|
||||||
|
|
1
py3.h
1
py3.h
|
@ -19,6 +19,7 @@
|
||||||
#define PyInt_FromLong PyLong_FromLong
|
#define PyInt_FromLong PyLong_FromLong
|
||||||
#define PyInt_AS_LONG PyLong_AS_LONG
|
#define PyInt_AS_LONG PyLong_AS_LONG
|
||||||
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
#define PyInt_FromSsize_t PyLong_FromSsize_t
|
||||||
|
#define PyInt_AsSsize_t PyLong_AsSsize_t
|
||||||
|
|
||||||
#else /* PY_VERSION_HEX < 0x03000000 */
|
#else /* PY_VERSION_HEX < 0x03000000 */
|
||||||
#define PY_ARG_BYTES_LENGTH "s#"
|
#define PY_ARG_BYTES_LENGTH "s#"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user