]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40422: create a common _Py_closerange API (GH-19754)
authorKyle Evans <kevans91@users.noreply.github.com>
Sun, 11 Oct 2020 18:54:11 +0000 (13:54 -0500)
committerGitHub <noreply@github.com>
Sun, 11 Oct 2020 18:54:11 +0000 (11:54 -0700)
commitc230fde8475e4e5581e74a4235654d17ccf4cff8
tree2433c12c29ee81ef47127bac4908354210ef4872
parentd5752aa5c91c56910efe226d0a000bb4481e4f87
bpo-40422: create a common _Py_closerange API (GH-19754)

Such an API can be used both for os.closerange and subprocess. For the latter, this yields potential improvement for platforms that have fdwalk but wouldn't have used it there. This will prove even more beneficial later for platforms that have close_range(2), as the new API will prefer that over all else if it's available.

The new API is structured to look more like close_range(2), closing from [start, end] rather than the [low, high) of os.closerange().

Automerge-Triggered-By: @gpshead
Misc/NEWS.d/next/C API/2020-10-10-14-05-24.bpo-40422.sh8IDY.rst [new file with mode: 0644]
Modules/_posixsubprocess.c
Modules/posixmodule.c
Modules/posixmodule.h