summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-06 09:50:03 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-06 09:50:03 +0300
commitec39756960def5fdd8cb0ae191429f2f8e229f55 (patch)
treeadb8bb87ed393db602face59929660b968f452e5 /Include/object.h
parent72783056983f216104087b6c49d85ea273bf67c4 (diff)
parent48842714b948fa239392ddd7e207151d5fcb8bc7 (diff)
downloadcpython-git-ec39756960def5fdd8cb0ae191429f2f8e229f55.tar.gz
Issue #22570: Renamed Py_SETREF to Py_XSETREF.
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/object.h b/Include/object.h
index a032005bdd..da8befa4ec 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -856,14 +856,14 @@ PyAPI_FUNC(void) _Py_Dealloc(PyObject *);
*
* The safe way is:
*
- * Py_SETREF(op, op2);
+ * Py_XSETREF(op, op2);
*
* That arranges to set `op` to `op2` _before_ decref'ing, so that any code
* triggered as a side-effect of `op` getting torn down no longer believes
* `op` points to a valid object.
*/
-#define Py_SETREF(op, op2) \
+#define Py_XSETREF(op, op2) \
do { \
PyObject *_py_tmp = (PyObject *)(op); \
(op) = (op2); \