[Python-checkins] cpython: Fix compile error under Windows

antoine.pitrou python-checkins at python.org
Thu May 12 02:07:04 CEST 2011


http://hg.python.org/cpython/rev/eb1b93fd68f5
changeset:   70047:eb1b93fd68f5
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Thu May 12 02:07:00 2011 +0200
summary:
  Fix compile error under Windows

files:
  Modules/_io/bufferedio.c |  6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)


diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -954,14 +954,16 @@
         /* 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 */
             }

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list