Skip to content

Commit c6c6ec6

Browse files
colesburycorona10
authored andcommitted
Add missing guards
1 parent 3c85ca1 commit c6c6ec6

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Modules/_multiprocessing/posixshmem.c

+4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@
22
posixshmem - A Python extension that provides shm_open() and shm_unlink()
33
*/
44

5+
#include "pyconfig.h" // Py_NOGIL
6+
7+
#ifndef Py_NOGIL
58
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
69
#define Py_LIMITED_API 0x030d0000
10+
#endif
711

812
#include <Python.h>
913

Modules/_scproxy.c

+6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@
33
* using the SystemConfiguration framework.
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
#include <SystemConfiguration/SystemConfiguration.h>

PC/winsound.c

+2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@
3535
winsound.PlaySound(None, 0)
3636
*/
3737

38+
#ifndef Py_NOGIL
3839
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
3940
#define Py_LIMITED_API 0x030d0000
41+
#endif
4042

4143
#include <Python.h>
4244
#include <windows.h>

0 commit comments

Comments
 (0)