https://github.com/python/cpython/commit/e7adeecc2b318505eb53bc779320f028be40cccc
commit: e7adeecc2b318505eb53bc779320f028be40cccc
branch: main
author: Nathan Goldbaum <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2025-01-03T13:10:24+05:30
summary:

gh-128426: Mention PySequence_Fast in free-threading C API HOWTO (#128428)

files:
M Doc/howto/free-threading-extensions.rst

diff --git a/Doc/howto/free-threading-extensions.rst 
b/Doc/howto/free-threading-extensions.rst
index c1ad42e7e55ee5..95f214179bfb0e 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to