mirror of
https://github.com/python/cpython.git
synced 2025-12-04 08:34:25 +00:00
Return bytes, not string from read(). Makes test_mmap.py pass.
This commit is contained in:
parent
1eb79cfd6d
commit
e5aeaad0ca
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue