]> granicus.if.org Git - python/commit
Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 19 Mar 2015 21:53:20 +0000 (22:53 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 19 Mar 2015 21:53:20 +0000 (22:53 +0100)
commit66aab0c4b5b6b328aebc115f96275e7dcd114f8b
treec607e0019befcb199fb8f916038d01a0b3b9a5f3
parent9eb57c5fa50ed2f57d9320bb575371868316b5f2
Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.

These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
Include/fileutils.h
Modules/_io/fileio.c
Modules/posixmodule.c
Objects/fileobject.c
Python/fileutils.c