cpython: bc2a22eaa0af (original) (raw)

Mercurial > cpython

changeset 95269:bc2a22eaa0af

Issue #23752: When built from an existing file descriptor, io.FileIO() now only calls fstat() once. Before fstat() was called twice, which was not necessary. [#23752]

Victor Stinner victor.stinner@gmail.com
date Mon, 30 Mar 2015 03:21:06 +0200
parents 49d3ff81f31f
children fe9a578d5f38
files Misc/NEWS Modules/_io/fileio.c
diffstat 2 files changed, 26 insertions(+), 24 deletions(-)[+] [-] Misc/NEWS 26 Modules/_io/fileio.c 24

line wrap: on

line diff

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -2,6 +2,32 @@ Python News +++++++++++ +What's New in Python 3.5.0 alpha 4? +=================================== + +Release date: XXX + +Core and Builtins +----------------- + +Library +------- + +- Issue #23752: When built from an existing file descriptor, io.FileIO() now

--- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -177,28 +177,6 @@ fileio_new(PyTypeObject *type, PyObject return (PyObject *) self; } -static int -check_fd(int fd) -{

-#ifdef MS_WINDOWS

-#else

-#endif

-} - #ifdef O_CLOEXEC extern int _Py_open_cloexec_works; #endif @@ -355,8 +333,6 @@ fileio_init(PyObject *oself, PyObject *a #endif if (fd >= 0) {