Issue #22570: Renamed Py_SETREF to Py_XSETREF.
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 51b5399..8b5b8f7 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1589,7 +1589,7 @@
         return -1;
 #else
         Py_INCREF(value);
-        Py_SETREF(self->ctx, (PySSLContext *)value);
+        Py_XSETREF(self->ctx, (PySSLContext *)value);
         SSL_set_SSL_CTX(self->ssl, self->ctx->ctx);
 #endif
     } else {
@@ -1646,7 +1646,7 @@
 static int
 PySSL_set_owner(PySSLSocket *self, PyObject *value, void *c)
 {
-    Py_SETREF(self->owner, PyWeakref_NewRef(value, NULL));
+    Py_XSETREF(self->owner, PyWeakref_NewRef(value, NULL));
     if (self->owner == NULL)
         return -1;
     return 0;