]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)
authorNathan Goldbaum <nathan.goldbaum@gmail.com>
Fri, 3 Jan 2025 07:40:24 +0000 (00:40 -0700)
committerGitHub <noreply@github.com>
Fri, 3 Jan 2025 07:40:24 +0000 (13:10 +0530)
Doc/howto/free-threading-extensions.rst

index c1ad42e7e55ee5e6c17aedc454989c384c495f5d..95f214179bfb0e7ce62354bc3b941c943b5a8240 100644 (file)
@@ -96,8 +96,10 @@ Most of the C API is thread-safe, but there are some exceptions.
 
 * **Struct Fields**: Accessing fields in Python C API objects or structs
   directly is not thread-safe if the field may be concurrently modified.
-* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM` and
-  :c:macro:`PyList_SET_ITEM` do not perform any error checking or locking.
+* **Macros**: Accessor macros like :c:macro:`PyList_GET_ITEM`,
+  :c:macro:`PyList_SET_ITEM`, and macros like
+  :c:macro:`PySequence_Fast_GET_SIZE` that use the object returned by
+  :c:func:`PySequence_Fast` do not perform any error checking or locking.
   These macros are not thread-safe if the container object may be modified
   concurrently.
 * **Borrowed References**: C API functions that return