Skip to content

Commit 9bc2b6b

Browse files
committed
Fix compile errors from rebasing on main
1 parent 7b3dd99 commit 9bc2b6b

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

Modules/_ctypes/_ctypes_test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
#ifndef _MSC_VER
2+
#include "pyconfig.h" // Py_NOGIL
3+
#endif
4+
5+
#ifndef Py_NOGIL
16
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
27
#define Py_LIMITED_API 0x030d0000
8+
#endif
39

410
// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
511
// linking the extension to python3.lib (which fails). Py_BUILD_CORE_MODULE is

Modules/_testimportmultiple.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
* foo, bar), only the first one is called the same as the compiled file.
55
*/
66

7+
#ifndef _MSC_VER
8+
#include "pyconfig.h" // Py_NOGIL
9+
#endif
10+
11+
#ifndef Py_NOGIL
712
#define Py_LIMITED_API 0x03020000
13+
#endif
814

915
#include <Python.h>
1016

Modules/_uuidmodule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
* DCE compatible Universally Unique Identifier library.
44
*/
55

6+
#ifndef _MSC_VER
7+
#include "pyconfig.h" // Py_NOGIL
8+
#endif
9+
10+
#ifndef Py_NOGIL
611
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
712
#define Py_LIMITED_API 0x030d0000
13+
#endif
814

915
#include "Python.h"
1016
#if defined(HAVE_UUID_H)

Modules/errnomodule.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
/* Errno module */
22

3+
#ifndef _MSC_VER
4+
#include "pyconfig.h" // Py_NOGIL
5+
#endif
6+
7+
#ifndef Py_NOGIL
38
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
49
#define Py_LIMITED_API 0x030d0000
10+
#endif
511

612
#include "Python.h"
713
#include <errno.h> // EPIPE

Modules/md5module.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@
1616

1717
/* MD5 objects */
1818

19+
#ifndef _MSC_VER
20+
#include "pyconfig.h" // Py_NOGIL
21+
#endif
22+
23+
#ifndef Py_NOGIL
1924
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
2025
#define Py_LIMITED_API 0x030d0000
26+
#endif
2127

2228
#include "Python.h"
2329
#include "hashlib.h"

Modules/resource.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1+
#ifndef _MSC_VER
2+
#include "pyconfig.h" // Py_NOGIL
3+
#endif
4+
5+
#ifndef Py_NOGIL
16
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
27
#define Py_LIMITED_API 0x030d0000
8+
#endif
39

410
#include "Python.h"
511
#include <errno.h> // errno

0 commit comments

Comments
 (0)