Issue #26200: Restored more safe usages of Py_SETREF.
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 6205708..1aa4571 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -294,9 +294,9 @@
     else
         Py_INCREF(dict);
 
-    Py_XSETREF(pto->fn, fn);
-    Py_XSETREF(pto->args, fnargs);
-    Py_XSETREF(pto->kw, kw);
+    Py_SETREF(pto->fn, fn);
+    Py_SETREF(pto->args, fnargs);
+    Py_SETREF(pto->kw, kw);
     Py_XSETREF(pto->dict, dict);
     Py_RETURN_NONE;
 }