bpo-30946: Remove obsolete fallback code in readline module (#2738)

* Remove obsolete fallback code in readline module

* Add NEWS

* Remove obsolete include

* Fix macro on Windows
This commit is contained in:
Antoine Pitrou 2017-07-18 17:05:03 +02:00 committed by GitHub
parent efa26bcd50
commit f474c5a3f3
7 changed files with 8 additions and 108 deletions

View file

@ -38,11 +38,12 @@ PyAPI_DATA(PyTypeObject) PyStdPrinter_Type;
#endif /* Py_LIMITED_API */
/* A routine to check if a file descriptor can be select()-ed. */
#ifdef HAVE_SELECT
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
#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) (1)
#endif /* HAVE_SELECT */
#define _PyIsSelectable_fd(FD) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
#endif
#ifdef __cplusplus
}