diff --git a/src/_imaging.c b/src/_imaging.c index f4af15b6ccf..2a4bcd16bbf 100644 --- a/src/_imaging.c +++ b/src/_imaging.c @@ -594,7 +594,7 @@ getink(PyObject *color, Imaging im, char *ink) { Python long (not int) that raises an overflow error when trying to return it into a 32 bit C long */ - PY_LONG_LONG r = 0; + long long r = 0; FLOAT32 ftmp; INT32 itmp; diff --git a/src/_imagingft.c b/src/_imagingft.c index 016823890df..94fb43743c2 100644 --- a/src/_imagingft.c +++ b/src/_imagingft.c @@ -840,7 +840,7 @@ font_render_impl(FontObject *self, PyObject *args) { int color = 0; /* is FT_LOAD_COLOR enabled? */ float stroke_width = 0; int stroke_filled = 0; - PY_LONG_LONG foreground_ink_long = 0; + long long foreground_ink_long = 0; unsigned int foreground_ink; const char *mode_name = NULL; const char *dir = NULL; diff --git a/src/decode.c b/src/decode.c index 279e98f18e7..213c104309e 100644 --- a/src/decode.c +++ b/src/decode.c @@ -934,7 +934,7 @@ PyImaging_Jpeg2KDecoderNew(PyObject *self, PyObject *args) { int reduce = 0; int layers = 0; int fd = -1; - PY_LONG_LONG length = -1; + long long length = -1; if (!PyArg_ParseTuple( args, "ss|iiiL", &mode, &format, &reduce, &layers, &fd, &length diff --git a/src/path.c b/src/path.c index 4eb1d6a60d9..16f58cf70e4 100644 --- a/src/path.c +++ b/src/path.c @@ -614,9 +614,10 @@ path_subscript(PyPathObject *self, PyObject *item) { int len = self->count; Py_ssize_t start, stop, step, slicelength; - if (PySlice_GetIndicesEx(item, len, &start, &stop, &step, &slicelength) < 0) { + if (PySlice_Unpack(item, &start, &stop, &step) < 0) { return NULL; } + slicelength = PySlice_AdjustIndices(len, &start, &stop, step); if (slicelength <= 0) { double *xy = alloc_array(0);