diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2019-09-25 05:47:04 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-09-25 05:47:04 (GMT) |
commit | ad7736faf5b82a24374c601a72599adf29951080 (patch) | |
tree | b494d8abfd9d4bc11a4091cd445a30939bf83532 /Modules/posixmodule.c | |
parent | 12f209eccb1587e8c98057d9c5f865c21f4a16c1 (diff) | |
download | cpython-ad7736faf5b82a24374c601a72599adf29951080.zip cpython-ad7736faf5b82a24374c601a72599adf29951080.tar.gz cpython-ad7736faf5b82a24374c601a72599adf29951080.tar.bz2 |
bpo-38265: Update os.pread to accept the length type as Py_ssize_t. (GH-16359)
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index c60d0c5..5664027 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -8827,11 +8827,10 @@ os_readv_impl(PyObject *module, int fd, PyObject *buffers) #ifdef HAVE_PREAD /*[clinic input] -# TODO length should be size_t! but Python doesn't support parsing size_t yet. os.pread fd: int - length: int + length: Py_ssize_t offset: Py_off_t / @@ -8842,8 +8841,8 @@ the beginning of the file. The file offset remains unchanged. [clinic start generated code]*/ static PyObject * -os_pread_impl(PyObject *module, int fd, int length, Py_off_t offset) -/*[clinic end generated code: output=435b29ee32b54a78 input=084948dcbaa35d4c]*/ +os_pread_impl(PyObject *module, int fd, Py_ssize_t length, Py_off_t offset) +/*[clinic end generated code: output=3f875c1eef82e32f input=85cb4a5589627144]*/ { Py_ssize_t n; int async_err = 0; |