Issue #22570: Renamed Py_SETREF to Py_XSETREF.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 46fb27e..a01862d 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -316,7 +316,7 @@
for (i = 0; i < (1 << MCACHE_SIZE_EXP); i++) {
method_cache[i].value = NULL;
Py_INCREF(Py_None);
- Py_SETREF(method_cache[i].name, Py_None);
+ Py_XSETREF(method_cache[i].name, Py_None);
}
/* mark all version tags as invalid */
PyType_Modified(&PyBaseObject_Type);
@@ -424,7 +424,7 @@
type->tp_name = tp_name;
Py_INCREF(value);
- Py_SETREF(((PyHeapTypeObject*)type)->ht_name, value);
+ Py_XSETREF(((PyHeapTypeObject*)type)->ht_name, value);
return 0;
}
@@ -445,7 +445,7 @@
et = (PyHeapTypeObject*)type;
Py_INCREF(value);
- Py_SETREF(et->ht_qualname, value);
+ Py_XSETREF(et->ht_qualname, value);
return 0;
}
@@ -2124,7 +2124,7 @@
return -1;
}
Py_XINCREF(value);
- Py_SETREF(*dictptr, value);
+ Py_XSETREF(*dictptr, value);
return 0;
}
@@ -2903,7 +2903,7 @@
else
method_cache_misses++;
#endif
- Py_SETREF(method_cache[h].name, name);
+ Py_XSETREF(method_cache[h].name, name);
}
return res;
}