Skip to content

bpo-40422: Move _Py_*_SUPPRESS_IPH bits into _Py_closerange #22672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -8782,6 +8782,7 @@ void
_Py_closerange(int first, int last)
{
first = Py_MAX(first, 0);
_Py_BEGIN_SUPPRESS_IPH
#ifdef HAVE_CLOSE_RANGE
if (close_range(first, last, 0) == 0 || errno != ENOSYS) {
/* Any errors encountered while closing file descriptors are ignored;
Expand Down Expand Up @@ -8812,6 +8813,7 @@ _Py_closerange(int first, int last)
}
}
#endif /* USE_FDWALK */
_Py_END_SUPPRESS_IPH
}

/*[clinic input]
Expand All @@ -8829,9 +8831,7 @@ os_closerange_impl(PyObject *module, int fd_low, int fd_high)
/*[clinic end generated code: output=0ce5c20fcda681c2 input=5855a3d053ebd4ec]*/
{
Py_BEGIN_ALLOW_THREADS
_Py_BEGIN_SUPPRESS_IPH
_Py_closerange(fd_low, fd_high - 1);
_Py_END_SUPPRESS_IPH
Py_END_ALLOW_THREADS
Py_RETURN_NONE;
}
Expand Down