Issue #22570: Renamed Py_SETREF to Py_XSETREF.
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index bb4c5ef..38bb0d8 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -966,7 +966,7 @@
"Oi", self->decoder, (int)self->readtranslate);
if (incrementalDecoder == NULL)
goto error;
- Py_SETREF(self->decoder, incrementalDecoder);
+ Py_XSETREF(self->decoder, incrementalDecoder);
}
}
@@ -1346,7 +1346,7 @@
static void
textiowrapper_set_decoded_chars(textio *self, PyObject *chars)
{
- Py_SETREF(self->decoded_chars, chars);
+ Py_XSETREF(self->decoded_chars, chars);
self->decoded_chars_used = 0;
}
@@ -1475,7 +1475,7 @@
goto fail;
}
Py_DECREF(dec_buffer);
- Py_SETREF(self->snapshot, Py_BuildValue("NN", dec_flags, next_input));
+ Py_XSETREF(self->snapshot, Py_BuildValue("NN", dec_flags, next_input));
}
Py_DECREF(input_chunk);
@@ -1575,7 +1575,7 @@
if (chunks != NULL) {
if (result != NULL && PyList_Append(chunks, result) < 0)
goto fail;
- Py_SETREF(result, PyUnicode_Join(_PyIO_empty_str, chunks));
+ Py_XSETREF(result, PyUnicode_Join(_PyIO_empty_str, chunks));
if (result == NULL)
goto fail;
Py_CLEAR(chunks);
@@ -1832,7 +1832,7 @@
if (chunks != NULL) {
if (line != NULL && PyList_Append(chunks, line) < 0)
goto error;
- Py_SETREF(line, PyUnicode_Join(_PyIO_empty_str, chunks));
+ Py_XSETREF(line, PyUnicode_Join(_PyIO_empty_str, chunks));
if (line == NULL)
goto error;
Py_DECREF(chunks);