Skip to content

Commit 954852e

Browse files
Move PyDict_Next strong ref note closer to free-threading section
1 parent 43b9356 commit 954852e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Doc/c-api/dict.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,12 @@ Dictionary Objects
297297
298298
.. note::
299299
300-
On the :term:`free threaded <free threading>` build, this function can be used safely inside
301-
a critical section. However, the references returned for *pkey* and
302-
*pvalue* are :term:`borrowed <borrowed reference>` and only valid while the critical section
303-
is held. If you need to use these objects outside the critical section or when the critical section
304-
can be suspended, create :term:`strong reference <strong reference>` (for example, with
300+
On the :term:`free-threaded <free threading>` build, this function can be
301+
used safely inside a critical section. However, the references returned
302+
for *pkey* and *pvalue* are :term:`borrowed <borrowed reference>` and only
303+
valid while the critical section is held. If you need to use these objects
304+
outside the critical section or when the critical section can be suspended,
305+
create :term:`strong reference <strong reference>` (for example, with
305306
:c:func:`Py_NewRef`).
306307
307308
.. code-block:: c

0 commit comments

Comments
 (0)