Skip to content

Commit

Permalink
Fix compile errors from rebasing on main
Browse files Browse the repository at this point in the history
  • Loading branch information
colesbury committed Oct 19, 2023
1 parent 7b3dd99 commit 9bc2b6b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Modules/_ctypes/_ctypes_test.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
#endif

// gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt
// linking the extension to python3.lib (which fails). Py_BUILD_CORE_MODULE is
Expand Down
6 changes: 6 additions & 0 deletions Modules/_testimportmultiple.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
* foo, bar), only the first one is called the same as the compiled file.
*/

#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
#define Py_LIMITED_API 0x03020000
#endif

#include <Python.h>

Expand Down
6 changes: 6 additions & 0 deletions Modules/_uuidmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
* DCE compatible Universally Unique Identifier library.
*/

#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
#endif

#include "Python.h"
#if defined(HAVE_UUID_H)
Expand Down
6 changes: 6 additions & 0 deletions Modules/errnomodule.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
/* Errno module */

#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
#endif

#include "Python.h"
#include <errno.h> // EPIPE
Expand Down
6 changes: 6 additions & 0 deletions Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,14 @@

/* MD5 objects */

#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
#endif

#include "Python.h"
#include "hashlib.h"
Expand Down
6 changes: 6 additions & 0 deletions Modules/resource.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#ifndef _MSC_VER
#include "pyconfig.h" // Py_NOGIL
#endif

#ifndef Py_NOGIL
// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
#define Py_LIMITED_API 0x030d0000
#endif

#include "Python.h"
#include <errno.h> // errno
Expand Down

0 comments on commit 9bc2b6b

Please sign in to comment.