summaryrefslogtreecommitdiff
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-04-10 18:12:01 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2016-04-10 18:12:01 +0300
commitf01e408c1688a207eba18444da8c151c872fba59 (patch)
tree3330812d856579add4526f10d5284164a15b6037 /Objects/unicodeobject.c
parent47c5474aa0cbe8dc3cf2c370b19769edd3f2e8d8 (diff)
parent57a01d3a0ee20ee9eea69b658c6bac0f39541625 (diff)
downloadcpython-git-f01e408c1688a207eba18444da8c151c872fba59.tar.gz
Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 2499a36958..8dc2a38e56 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -1830,7 +1830,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
_Py_INCREF_UNICODE_EMPTY();
if (!unicode_empty)
return -1;
- Py_XSETREF(*p_unicode, unicode_empty);
+ Py_SETREF(*p_unicode, unicode_empty);
return 0;
}
@@ -1838,7 +1838,7 @@ unicode_resize(PyObject **p_unicode, Py_ssize_t length)
PyObject *copy = resize_copy(unicode, length);
if (copy == NULL)
return -1;
- Py_XSETREF(*p_unicode, copy);
+ Py_SETREF(*p_unicode, copy);
return 0;
}
@@ -13547,7 +13547,7 @@ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
return -1;
_PyUnicode_FastCopyCharacters(newbuffer, 0,
writer->buffer, 0, writer->pos);
- Py_XSETREF(writer->buffer, newbuffer);
+ Py_SETREF(writer->buffer, newbuffer);
}
_PyUnicodeWriter_Update(writer);
return 0;
@@ -15264,7 +15264,7 @@ PyUnicode_InternInPlace(PyObject **p)
if (t) {
Py_INCREF(t);
- Py_XSETREF(*p, t);
+ Py_SETREF(*p, t);
return;
}