STINNER Victor added the comment: > On Windows, the type of the size parameter of read() is an unsigned int, not > long nor size_t (...)
Oh, I read the wrong function. In fact, file_read() of Python 2.7 calls fread() and fread() uses size_t types, even on Windows. To make sure that we are talking about the same thing, I wrote the attached file_read_size_t.patch file which replaces "l" with "n" in file_read(). Note: os.read() uses int types, even on Python 3.5, whereas read() uses a size_t type for the number of bytes on Linux. ---------- keywords: +patch Added file: http://bugs.python.org/file34906/file_read_size_t.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21199> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com