Skip to content

Commit e7adeec

Browse files
authored
gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)
1 parent 8eebe4e commit e7adeec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/howto/free-threading-extensions.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,10 @@ Most of the C API is thread-safe, but there are some exceptions.
9696

9797
* **Struct Fields**: Accessing fields in Python C API objects or structs
9898
directly is not thread-safe if the field may be concurrently modified.
99-
* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM` and
100-
:c:macro:`PyList_SET_ITEM` do not perform any error checking or locking.
99+
* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM`,
100+
:c:macro:`PyList_SET_ITEM`, and macros like
101+
:c:macro:`PySequence_Fast_GET_SIZE` that use the object returned by
102+
:c:func:`PySequence_Fast` do not perform any error checking or locking.
101103
These macros are not thread-safe if the container object may be modified
102104
concurrently.
103105
* **Borrowed References**: C API functions that return

0 commit comments

Comments
 (0)