Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Py_SETREF() was added to Python 3.6 (and Python 3.5.2)
  • Loading branch information
vstinner committed Nov 9, 2022
commit 655234e0dbe6ec60f11cd2c3ef46f2e7b24099f5
4 changes: 4 additions & 0 deletions Doc/c-api/refcounting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ of Python objects.
*dst* old value, so that any code triggered as a side-effect of `dst`
getting torn down no longer believes `dst` points to a valid object.

.. versionadded:: 3.6

.. versionchanged:: 3.12
The macro arguments are now only evaluated once. If an argument has side
effects, there are no longer duplicated.
Expand All @@ -174,6 +176,8 @@ of Python objects.
Variant of :c:macro:`Py_SETREF` macro that uses :c:func:`Py_XDECREF` instead
of :c:func:`Py_DECREF`.

.. versionadded:: 3.6

.. versionchanged:: 3.12
The macro arguments are now only evaluated once. If an argument has side
effects, there are no longer duplicated.