]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix compile error under Windows
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 12 May 2011 00:07:00 +0000 (02:07 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 12 May 2011 00:07:00 +0000 (02:07 +0200)
Modules/_io/bufferedio.c

index 8e3d3c67b582dab9729abfe5a02625ba0c95e866..dfe593f54dda098427c24bc7e80e10b14ac4861a 100644 (file)
@@ -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 */
             }