summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorNathan Goldbaum <nathan.goldbaum@gmail.com>2025-01-03 07:40:24 (GMT)
committerGitHub <noreply@github.com>2025-01-03 07:40:24 (GMT)
commite7adeecc2b318505eb53bc779320f028be40cccc (patch)
tree88a838c64c2fe5e3ff7b89d05fa49851ddbeedf5 /Doc/howto
parent8eebe4e6d02bb4ad3f1ca6c52624186903dce893 (diff)
downloadcpython-e7adeecc2b318505eb53bc779320f028be40cccc.zip
cpython-e7adeecc2b318505eb53bc779320f028be40cccc.tar.gz
cpython-e7adeecc2b318505eb53bc779320f028be40cccc.tar.bz2
gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/free-threading-extensions.rst6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/howto/free-threading-extensions.rst b/Doc/howto/free-threading-extensions.rst
index c1ad42e..95f2141 100644
--- a/Doc/howto/free-threading-extensions.rst
+++ b/Doc/howto/free-threading-extensions.rst
@@ -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