Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
diff --git a/Python/errors.c b/Python/errors.c
index 1d6e432..47d7c4b 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -311,9 +311,9 @@
--tstate->recursion_depth;
/* throw away the old exception and use the recursion error instead */
Py_INCREF(PyExc_RecursionError);
- Py_XSETREF(*exc, PyExc_RecursionError);
+ Py_SETREF(*exc, PyExc_RecursionError);
Py_INCREF(PyExc_RecursionErrorInst);
- Py_XSETREF(*val, PyExc_RecursionErrorInst);
+ Py_SETREF(*val, PyExc_RecursionErrorInst);
/* just keeping the old traceback */
return;
}