mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-106320: Remove _PyIsSelectable_fd() C API (#107142)
Move _PyIsSelectable_fd() macro to the internal C API (pycore_fileutils.h).
This commit is contained in:
parent
956b3de816
commit
adb27ea2d5
3 changed files with 8 additions and 8 deletions
|
@ -10,6 +10,13 @@ extern "C" {
|
|||
|
||||
#include <locale.h> /* struct lconv */
|
||||
|
||||
/* A routine to check if a file descriptor can be select()-ed. */
|
||||
#ifdef _MSC_VER
|
||||
/* On Windows, any socket fd can be select()-ed, no matter how high */
|
||||
#define _PyIsSelectable_fd(FD) (1)
|
||||
#else
|
||||
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
|
||||
#endif
|
||||
|
||||
struct _fileutils_state {
|
||||
int force_ascii;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue