New submission from STINNER Victor: os.read() currently uses the int type for the size parameter, whereas the C function uses a C size_t parameter:
ssize_t read(int fd, void *buf, size_t count); The Python function must use the Py_ssize_t type, but truncate to INT_MAX on Windows, as done in FileIO.read(). It would help to implement FileIO in pure Python: issue #21859. I don't think that this enhancement should be backported to Python 2.7 nor Python 3.4. ---------- files: posix_read_py_ssize_t.patch keywords: patch messages: 222462 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: os.read() must use Py_ssize_t for the size parameter type: enhancement versions: Python 3.5 Added file: http://bugs.python.org/file35882/posix_read_py_ssize_t.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21932> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com