Commit 4e19e119 authored by Antoine Pitrou's avatar Antoine Pitrou

Fix compile error under Windows

parent 3486a98d
...@@ -954,14 +954,16 @@ buffered_readinto(buffered *self, PyObject *args) ...@@ -954,14 +954,16 @@ buffered_readinto(buffered *self, PyObject *args)
/* If remaining bytes is larger than internal buffer size, copy /* If remaining bytes is larger than internal buffer size, copy
* directly into caller's buffer. */ * directly into caller's buffer. */
if (remaining > self->buffer_size) { 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 { else {
n = _bufferedreader_fill_buffer(self); n = _bufferedreader_fill_buffer(self);
if (n > 0) { if (n > 0) {
if (n > remaining) if (n > remaining)
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; self->pos += n;
continue; /* short circuit */ continue; /* short circuit */
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment