-
Notifications
You must be signed in to change notification settings - Fork 782
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PyList_GetItemRef and use it in list.get_item (#4410)
* Add PyList_GetItemRef bindings and compat shim * Use PyList_GetItemRef in list.get_item() * add release notes * apply code review comments * Update newsfragments/4410.added.md Co-authored-by: David Hewitt <mail@davidhewitt.dev> * apply `all()` doc cfg hints --------- Co-authored-by: David Hewitt <mail@davidhewitt.dev>
- Loading branch information
1 parent
d103c76
commit 5e6e432
Showing
5 changed files
with
26 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add ffi binding `PyList_GetItemRef` and `pyo3_ffi::compat::PyList_GetItemRef` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* Avoid creating temporary borrowed reference in list.get_item | ||
bindings. Temporary borrowed references are unsafe in the free-threaded python | ||
build if the list is shared between threads. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters