Skip to content

Commit 39d381f

Browse files
authored
gh-111506: Error if the limited API is used in free-threaded build (#117762)
Issue a build time error if both `Py_LIMITED_API` and `Py_GIL_DISABLED` are defined.
1 parent c06be6b commit 39d381f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Include/Python.h

+5
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@
4545
# endif
4646
#endif
4747

48+
// gh-111506: The free-threaded build is not compatible with the limited API
49+
// or the stable ABI.
50+
#if defined(Py_LIMITED_API) && defined(Py_GIL_DISABLED)
51+
# error "The limited API is not currently supported in the free-threaded build"
52+
#endif
4853

4954
// Include Python header files
5055
#include "pyport.h"

0 commit comments

Comments
 (0)