Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 5fd52d9..a319333 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -2498,7 +2498,7 @@
{
/* We can set the private field even if db is closed */
Py_INCREF(private_obj);
- Py_XSETREF(self->private_obj, private_obj);
+ Py_SETREF(self->private_obj, private_obj);
RETURN_NONE();
}
@@ -6997,7 +6997,7 @@
{
/* We can set the private field even if dbenv is closed */
Py_INCREF(private_obj);
- Py_XSETREF(self->private_obj, private_obj);
+ Py_SETREF(self->private_obj, private_obj);
RETURN_NONE();
}
@@ -7410,7 +7410,7 @@
RETURN_IF_ERR();
Py_INCREF(rep_transport);
- Py_XSETREF(self->rep_transport, rep_transport);
+ Py_SETREF(self->rep_transport, rep_transport);
RETURN_NONE();
}