Author: guido.van.rossum
Date: Thu Jul 26 20:28:23 2007
New Revision: 56554

Modified:
   python/branches/py3k-struni/Modules/mmapmodule.c
Log:
Return bytes, not string from read().  Makes test_mmap.py pass.


Modified: python/branches/py3k-struni/Modules/mmapmodule.c
==============================================================================
--- python/branches/py3k-struni/Modules/mmapmodule.c    (original)
+++ python/branches/py3k-struni/Modules/mmapmodule.c    Thu Jul 26 20:28:23 2007
@@ -226,7 +226,7 @@
        if ((self->pos + num_bytes) > self->size) {
                num_bytes -= (self->pos+num_bytes) - self->size;
        }
-       result = Py_BuildValue("s#", self->data+self->pos, num_bytes);
+       result = PyBytes_FromStringAndSize(self->data+self->pos, num_bytes);
        self->pos += num_bytes;
        return result;
 }
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to