[issue40422] Light refactor: create a common _Py_closerange API
STINNER Victor
report at bugs.python.org
Sun Oct 11 18:34:54 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
Python/fileutils.c might be a better home for such helper function.
You might move _Py_BEGIN_SUPPRESS_IPH / _Py_END_SUPPRESS_IPH macros into _Py_closerange(), even if currently it makes no diffence. (_Py_BEGIN_SUPPRESS_IPH is specific to Windows, os.closerange() uses it, and _posixsubprocess doesn't need it since it's not used on Windows.)
See also the idea of reminding if the kernel supports the syscall or not:
https://github.com/python/cpython/pull/22651#pullrequestreview-506215041
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40422>
_______________________________________
More information about the Python-bugs-list
mailing list