Commit e5aeaad0 authored by Guido van Rossum's avatar Guido van Rossum

Return bytes, not string from read(). Makes test_mmap.py pass.

parent 1eb79cfd
......@@ -226,7 +226,7 @@ mmap_read_method(mmap_object *self,
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;
}
......
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