File tree Expand file tree Collapse file tree 5 files changed +44
-40
lines changed
Expand file tree Collapse file tree 5 files changed +44
-40
lines changed Original file line number Diff line number Diff line change @@ -932,8 +932,8 @@ Build Changes
932932* Building CPython now requires a compiler with support for the C11 atomic
933933 library, GCC built-in atomic functions, or MSVC interlocked intrinsics.
934934
935- * The ``_stat `` and ``_testimportmultiple `` C extensions are now built with the
936- :ref: `limited C API <limited-c-api >`.
935+ * The ``errno ``, `` _stat `` and ``_testimportmultiple `` C extensions are now
936+ built with the :ref: `limited C API <limited-c-api >`.
937937 (Contributed by Victor Stinner in :gh: `85283 `.)
938938
939939
Original file line number Diff line number Diff line change 1- The ``_testimportmultiple `` C extension is now built with the :ref: ` limited
2- C API <limited-c-api>`. Patch by Victor Stinner.
1+ The ``errno `` and `` _testimportmultiple `` C extensions are now built with the
2+ :ref: ` limited C API <limited-c-api >`. Patch by Victor Stinner.
Original file line number Diff line number Diff line change 1+ #define Py_LIMITED_API 0x03060000
2+
13#include <Python.h>
24
5+ #include <stdlib.h> // qsort()
36#ifdef MS_WIN32
4- #include <windows.h>
7+ # include <windows.h>
58#endif
69
7- #include <stdlib.h> // qsort()
8-
910#define EXPORT (x ) Py_EXPORTED_SYMBOL x
1011
1112/* some functions handy for testing */
Original file line number Diff line number Diff line change 44 * foo, bar), only the first one is called the same as the compiled file.
55 */
66
7- #define Py_LIMITED_API 0x030d0000
7+ #define Py_LIMITED_API 0x03020000
88
99#include <Python.h>
1010
Original file line number Diff line number Diff line change 1-
21/* Errno module */
32
3+ // Need PyModuleDef_Slot added to limited C API version 3.5
4+ #define Py_LIMITED_API 0x03050000
5+
46#include "Python.h"
57
68/* Windows socket errors (WSA*) */
79#ifdef MS_WINDOWS
8- #ifndef WIN32_LEAN_AND_MEAN
9- #define WIN32_LEAN_AND_MEAN
10- #endif
11- #include <windows.h>
12- /* The following constants were added to errno.h in VS2010 but have
13- preferred WSA equivalents. */
14- #undef EADDRINUSE
15- #undef EADDRNOTAVAIL
16- #undef EAFNOSUPPORT
17- #undef EALREADY
18- #undef ECONNABORTED
19- #undef ECONNREFUSED
20- #undef ECONNRESET
21- #undef EDESTADDRREQ
22- #undef EHOSTUNREACH
23- #undef EINPROGRESS
24- #undef EISCONN
25- #undef ELOOP
26- #undef EMSGSIZE
27- #undef ENETDOWN
28- #undef ENETRESET
29- #undef ENETUNREACH
30- #undef ENOBUFS
31- #undef ENOPROTOOPT
32- #undef ENOTCONN
33- #undef ENOTSOCK
34- #undef EOPNOTSUPP
35- #undef EPROTONOSUPPORT
36- #undef EPROTOTYPE
37- #undef ETIMEDOUT
38- #undef EWOULDBLOCK
10+ # ifndef WIN32_LEAN_AND_MEAN
11+ # define WIN32_LEAN_AND_MEAN
12+ # endif
13+ # include <windows.h>
14+
15+ // The following constants were added to errno.h in VS2010 but have
16+ // preferred WSA equivalents.
17+ # undef EADDRINUSE
18+ # undef EADDRNOTAVAIL
19+ # undef EAFNOSUPPORT
20+ # undef EALREADY
21+ # undef ECONNABORTED
22+ # undef ECONNREFUSED
23+ # undef ECONNRESET
24+ # undef EDESTADDRREQ
25+ # undef EHOSTUNREACH
26+ # undef EINPROGRESS
27+ # undef EISCONN
28+ # undef ELOOP
29+ # undef EMSGSIZE
30+ # undef ENETDOWN
31+ # undef ENETRESET
32+ # undef ENETUNREACH
33+ # undef ENOBUFS
34+ # undef ENOPROTOOPT
35+ # undef ENOTCONN
36+ # undef ENOTSOCK
37+ # undef EOPNOTSUPP
38+ # undef EPROTONOSUPPORT
39+ # undef EPROTOTYPE
40+ # undef ETIMEDOUT
41+ # undef EWOULDBLOCK
3942#endif
4043
4144/*
You can’t perform that action at this time.
0 commit comments