Fix compile error under Windows
This commit is contained in:
parent
3486a98dcd
commit
4e19e11958
|
@ -954,14 +954,16 @@ buffered_readinto(buffered *self, PyObject *args)
|
|||
/* If remaining bytes is larger than internal buffer size, copy
|
||||
* directly into caller's buffer. */
|
||||
if (remaining > self->buffer_size) {
|
||||
n = _bufferedreader_raw_read(self, buf.buf + written, remaining);
|
||||
n = _bufferedreader_raw_read(self, (char *) buf.buf + written,
|
||||
remaining);
|
||||
}
|
||||
else {
|
||||
n = _bufferedreader_fill_buffer(self);
|
||||
if (n > 0) {
|
||||
if (n > remaining)
|
||||
n = remaining;
|
||||
memcpy(buf.buf + written, self->buffer + self->pos, n);
|
||||
memcpy((char *) buf.buf + written,
|
||||
self->buffer + self->pos, n);
|
||||
self->pos += n;
|
||||
continue; /* short circuit */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue