Skip to content

Commit

Permalink
clarify limited API support a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ngoldbaum committed Nov 4, 2024
1 parent a261ac0 commit d304279
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/porting.md
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,11 @@ build.
### Limited API support

The free-threaded build does not support the limited CPython C API. If you
currently use the limited API you will not be able to use it while shipping
binaries for the free-threaded build. This also means that code inside
`#ifdef Py_GIL_DISABLED` checks can use C API constructs outside the limited API if you
currently use the limited API to build wheels that do not depend on a specific
Python version, you will not be able to use it while shipping binaries for the
free-threaded build. In practice, the limited API is a subset of the full C API,
so your extension will almost certainly build, you just cannot set
`Py_LIMITED_API` at build time. This also means that code inside `#ifdef
Py_GIL_DISABLED` checks can use C API constructs outside the limited API if you
would like to do that, although these uses will need to be removed once the
free-threaded build gains support for compiling with the limited API.

0 comments on commit d304279

Please sign in to comment.