[Python-checkins] cpython (2.7): Always define _PyIsSelectable_fd().

charles-francois.natali python-checkins at python.org
Sun Aug 28 16:42:01 CEST 2011


http://hg.python.org/cpython/rev/31b18a0242ca
changeset: 72114:31b18a0242ca
branch: 2.7
user: Charles-François Natali <neologix at free.fr>
date: Sun Aug 28 16:43:24 2011 +0200
summary:
 Always define _PyIsSelectable_fd().
files:
 Include/fileobject.h | 8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/Include/fileobject.h b/Include/fileobject.h
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -84,13 +84,11 @@
 #define _PyVerify_fd(A) (1) /* dummy */
 #endif
 
+/* A routine to check if a file descriptor can be select()-ed. */
 #ifdef HAVE_SELECT
-/* A routine to check if a file descriptor can be select()-ed. */
-#ifdef Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
+ #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
+#else
 #define _PyIsSelectable_fd(FD) (1)
-#else
- #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
-#endif
 #endif /* HAVE_SELECT */
 
 #ifdef __cplusplus
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /