mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
Reuse PyUnicode_Copy() in validate_and_copy_tuple()
This commit is contained in:
parent
beac78bb24
commit
ed2682be2f
1 changed files with 1 additions and 3 deletions
|
@ -249,9 +249,7 @@ validate_and_copy_tuple(PyObject *tup)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
item = PyUnicode_FromUnicode(
|
item = PyUnicode_Copy(item);
|
||||||
PyUnicode_AS_UNICODE(item),
|
|
||||||
PyUnicode_GET_SIZE(item));
|
|
||||||
if (item == NULL) {
|
if (item == NULL) {
|
||||||
Py_DECREF(newtuple);
|
Py_DECREF(newtuple);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue