summaryrefslogtreecommitdiffstats
path: root/Include/fileobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/fileobject.h')
-rw-r--r--Include/fileobject.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/fileobject.h b/Include/fileobject.h
index c4a2a2b..a99c94d 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -44,6 +44,13 @@ int _PyVerify_fd(int fd);
#endif
#endif /* Py_LIMITED_API */
+/* A routine to check if a file descriptor can be select()-ed. */
+#ifdef HAVE_SELECT
+ #define _PyIsSelectable_fd(FD) (((FD) >= 0) && ((FD) < FD_SETSIZE))
+#else
+ #define _PyIsSelectable_fd(FD) (1)
+#endif /* HAVE_SELECT */
+
#ifdef __cplusplus
}
#endif