Skip to content

Commit

Permalink
porting: link to the free-threading unsafe borrowed ref APIs docs
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Sep 20, 2024
1 parent 65ed051 commit 45452bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/porting.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ bugs in C or C++ code using the C API directly. However, many usages *are*
unsafe, and maintaining a borrowed reference to an objects that could be exposed
to another thread is unsafe.

A good starting place to find instances of this would be to look for usages of the
[unsafe borrowed reference APIs mentioned in the free-threading compatibility docs](https://docs.python.org/3.14/howto/free-threading-extensions.html#borrowed-references).

### Adopt `pythoncapi-compat` to use new C API functions

Rather than maintaining compatibility shims to use functions added to the C API
Expand Down

0 comments on commit 45452bd

Please sign in to comment.