diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-11-04 12:35:21 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2010-11-04 12:35:21 (GMT) |
commit | 09ea792a9423802002500ae0dfa3d668f5e5d9f6 (patch) | |
tree | dc417194ff526c12a7d6afc29bde285cdfee34b2 /Modules | |
parent | fc5f381caa8273765a3011fffe16c42690ad1aa2 (diff) | |
download | cpython-09ea792a9423802002500ae0dfa3d668f5e5d9f6.zip cpython-09ea792a9423802002500ae0dfa3d668f5e5d9f6.tar.gz cpython-09ea792a9423802002500ae0dfa3d668f5e5d9f6.tar.bz2 |
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].
........
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/mmapmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index c39715a..0005113 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -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; |