diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-06 06:50:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-04-06 06:50:03 (GMT) |
commit | ec39756960def5fdd8cb0ae191429f2f8e229f55 (patch) | |
tree | adb8bb87ed393db602face59929660b968f452e5 /Modules/_io | |
parent | 72783056983f216104087b6c49d85ea273bf67c4 (diff) | |
parent | 48842714b948fa239392ddd7e207151d5fcb8bc7 (diff) | |
download | cpython-ec39756960def5fdd8cb0ae191429f2f8e229f55.zip cpython-ec39756960def5fdd8cb0ae191429f2f8e229f55.tar.gz cpython-ec39756960def5fdd8cb0ae191429f2f8e229f55.tar.bz2 |
Issue #22570: Renamed Py_SETREF to Py_XSETREF.
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/bufferedio.c | 8 | ||||
-rw-r--r-- | Modules/_io/bytesio.c | 4 | ||||
-rw-r--r-- | Modules/_io/textio.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c index 0632014..f4d179a 100644 --- a/Modules/_io/bufferedio.c +++ b/Modules/_io/bufferedio.c @@ -1196,7 +1196,7 @@ found: Py_CLEAR(res); goto end; } - Py_SETREF(res, _PyBytes_Join(_PyIO_empty_bytes, chunks)); + Py_XSETREF(res, _PyBytes_Join(_PyIO_empty_bytes, chunks)); end: LEAVE_BUFFERED(self) @@ -1452,7 +1452,7 @@ _io_BufferedReader___init___impl(buffered *self, PyObject *raw, return -1; Py_INCREF(raw); - Py_SETREF(self->raw, raw); + Py_XSETREF(self->raw, raw); self->buffer_size = buffer_size; self->readable = 1; self->writable = 0; @@ -1804,7 +1804,7 @@ _io_BufferedWriter___init___impl(buffered *self, PyObject *raw, return -1; Py_INCREF(raw); - Py_SETREF(self->raw, raw); + Py_XSETREF(self->raw, raw); self->readable = 0; self->writable = 1; @@ -2307,7 +2307,7 @@ _io_BufferedRandom___init___impl(buffered *self, PyObject *raw, return -1; Py_INCREF(raw); - Py_SETREF(self->raw, raw); + Py_XSETREF(self->raw, raw); self->buffer_size = buffer_size; self->readable = 1; self->writable = 1; diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c index 6333e46..84d2c5d 100644 --- a/Modules/_io/bytesio.c +++ b/Modules/_io/bytesio.c @@ -96,7 +96,7 @@ unshare_buffer(bytesio *self, size_t size) return -1; memcpy(PyBytes_AS_STRING(new_buf), PyBytes_AS_STRING(self->buf), self->string_size); - Py_SETREF(self->buf, new_buf); + Py_XSETREF(self->buf, new_buf); return 0; } @@ -967,7 +967,7 @@ _io_BytesIO___init___impl(bytesio *self, PyObject *initvalue) if (initvalue && initvalue != Py_None) { if (PyBytes_CheckExact(initvalue)) { Py_INCREF(initvalue); - Py_SETREF(self->buf, initvalue); + Py_XSETREF(self->buf, initvalue); self->string_size = PyBytes_GET_SIZE(initvalue); } else { diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 8c9732b..9af07bf 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -995,7 +995,7 @@ _io_TextIOWrapper___init___impl(textio *self, PyObject *buffer, "Oi", self->decoder, (int)self->readtranslate); if (incrementalDecoder == NULL) goto error; - Py_SETREF(self->decoder, incrementalDecoder); + Py_XSETREF(self->decoder, incrementalDecoder); } } @@ -1373,7 +1373,7 @@ _io_TextIOWrapper_write_impl(textio *self, PyObject *text) 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; } @@ -1521,7 +1521,7 @@ textiowrapper_read_chunk(textio *self, Py_ssize_t size_hint) dec_buffer = NULL; /* Reference lost to PyBytes_Concat */ goto fail; } - 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); @@ -1627,7 +1627,7 @@ _io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n) 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); |