mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Merged revisions 86159 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86159 | hirokazu.yamamoto | 2010-11-04 21:09:08 +0900 | 2 lines Issue #5391: mmap.read_byte() should return unsigned value [0, 255] instead of signed value [-127, 128]. ........
This commit is contained in:
parent
fc5f381caa
commit
09ea792a94
2 changed files with 10 additions and 1 deletions
|
|
@ -205,7 +205,7 @@ mmap_read_byte_method(mmap_object *self,
|
|||
if (self->pos < self->size) {
|
||||
char value = self->data[self->pos];
|
||||
self->pos += 1;
|
||||
return Py_BuildValue("b", value);
|
||||
return Py_BuildValue("B", (unsigned char)value);
|
||||
} else {
|
||||
PyErr_SetString(PyExc_ValueError, "read byte out of range");
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue