File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,6 @@ Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_HasFileSystemDefaultEncoding;
2929Py_DEPRECATED (3.12 ) PyAPI_DATA (int ) Py_UTF8Mode ;
3030#endif
3131
32- /* A routine to check if a file descriptor can be select()-ed. */
33- #ifdef _MSC_VER
34- /* On Windows, any socket fd can be select()-ed, no matter how high */
35- #define _PyIsSelectable_fd (FD ) (1)
36- #else
37- #define _PyIsSelectable_fd (FD ) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
38- #endif
39-
4032#ifndef Py_LIMITED_API
4133# define Py_CPYTHON_FILEOBJECT_H
4234# include "cpython/fileobject.h"
Original file line number Diff line number Diff line change @@ -10,6 +10,13 @@ extern "C" {
1010
1111#include <locale.h> /* struct lconv */
1212
13+ /* A routine to check if a file descriptor can be select()-ed. */
14+ #ifdef _MSC_VER
15+ /* On Windows, any socket fd can be select()-ed, no matter how high */
16+ #define _PyIsSelectable_fd (FD ) (1)
17+ #else
18+ #define _PyIsSelectable_fd (FD ) ((unsigned int)(FD) < (unsigned int)FD_SETSIZE)
19+ #endif
1320
1421struct _fileutils_state {
1522 int force_ascii ;
Original file line number Diff line number Diff line change 2626#define OPENSSL_NO_DEPRECATED 1
2727
2828#include "Python.h"
29+ #include "pycore_fileutils.h" // _PyIsSelectable_fd()
2930#include "pycore_weakref.h" // _PyWeakref_GET_REF()
3031
3132/* Include symbols from _socket module */
You can’t perform that action at this time.
0 commit comments