diff --git a/libImaging/Incremental.c b/libImaging/Incremental.c index 206c8130b..84e20acf6 100644 --- a/libImaging/Incremental.c +++ b/libImaging/Incremental.c @@ -413,7 +413,7 @@ ImagingIncrementalCodecBytesInBuffer(ImagingIncrementalCodec codec) return codec->stream.ptr - codec->stream.buffer; } -ssize_t +Py_ssize_t ImagingIncrementalCodecRead(ImagingIncrementalCodec codec, void *buffer, size_t bytes) { @@ -428,7 +428,7 @@ ImagingIncrementalCodecRead(ImagingIncrementalCodec codec, DEBUG("reading (want %llu bytes)\n", (unsigned long long)bytes); if (codec->stream.fd >= 0) { - ssize_t ret = read(codec->stream.fd, buffer, bytes); + Py_ssize_t ret = read(codec->stream.fd, buffer, bytes); DEBUG("read %lld bytes from fd\n", (long long)ret); return ret; } @@ -497,7 +497,7 @@ ImagingIncrementalCodecSkip(ImagingIncrementalCodec codec, off_t done = 0; while (bytes) { size_t todo = (size_t)(bytes > 256 ? 256 : bytes); - ssize_t written = ImagingIncrementalCodecWrite(codec, zeroes, todo); + Py_ssize_t written = ImagingIncrementalCodecWrite(codec, zeroes, todo); if (written <= 0) break; done += written; @@ -554,7 +554,7 @@ ImagingIncrementalCodecSkip(ImagingIncrementalCodec codec, return done; } -ssize_t +Py_ssize_t ImagingIncrementalCodecWrite(ImagingIncrementalCodec codec, const void *buffer, size_t bytes) {