mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-90699: Use _Py_STR(empty) instead of PyUnicode_New(0, 0) for BUILD_STRING (GH-91476)
This commit is contained in:
parent
b7f83bdd0e
commit
72965981d1
1 changed files with 2 additions and 6 deletions
|
|
@ -3152,12 +3152,8 @@ handle_eval_breaker:
|
||||||
|
|
||||||
TARGET(BUILD_STRING) {
|
TARGET(BUILD_STRING) {
|
||||||
PyObject *str;
|
PyObject *str;
|
||||||
PyObject *empty = PyUnicode_New(0, 0);
|
str = _PyUnicode_JoinArray(&_Py_STR(empty),
|
||||||
if (empty == NULL) {
|
stack_pointer - oparg, oparg);
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
str = _PyUnicode_JoinArray(empty, stack_pointer - oparg, oparg);
|
|
||||||
Py_DECREF(empty);
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
goto error;
|
goto error;
|
||||||
while (--oparg >= 0) {
|
while (--oparg >= 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue