Skip to content

Commit 597c0b5

Browse files
Doc: clarify PyDict_Next docs for free-threaded build
1 parent cecf233 commit 597c0b5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/c-api/dict.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,12 @@ Dictionary Objects
260260
261261
.. note::
262262
263-
In the free-threaded build, this function can be used safely inside
263+
On the :term:`free threaded <free threading>` build, this function can be used safely inside
264264
a critical section. However, the references returned for *pkey* and
265-
*pvalue* are borrowed and only valid while the critical section is
266-
held. If you need to use these objects outside the critical section,
267-
create strong references (for example, with :c:func:`Py_NewRef`).
265+
*pvalue* are :term:`borrowed <borrowed reference>` and only valid while the critical section is
266+
held. If you need to use these objects outside the critical section or when the critical section
267+
can be suspended, create :term:`strong references <strong reference>` (for example, with
268+
:c:func:`Py_NewRef`).
268269
269270
For example::
270271

0 commit comments

Comments
 (0)