We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyDict_Next
1 parent 86f7bb7 commit 65bf6f5Copy full SHA for 65bf6f5
Doc/c-api/dict.rst
@@ -301,6 +301,15 @@ Dictionary Objects
301
}
302
Py_END_CRITICAL_SECTION();
303
304
+ .. note::
305
+
306
+ On the free-threaded build, this function can be used safely inside a
307
+ critical section. However, the references returned for *pkey* and *pvalue*
308
+ are :term:`borrowed <borrowed reference>` and are only valid while the
309
+ critical section is held. If you need to use these objects outside the
310
+ critical section or when the critical section can be suspended, create a
311
+ :term:`strong reference <strong reference>` (for example, using
312
+ :c:func:`Py_NewRef`).
313
314
.. c:function:: int PyDict_Merge(PyObject *a, PyObject *b, int override)
315
0 commit comments