mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
GH-94851: fix immortal objects refcounting in compiler (gh-95040)
(cherry picked from commit 7476154886
)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
This commit is contained in:
parent
1093804b88
commit
16cb8ca52e
1 changed files with 1 additions and 1 deletions
|
@ -4912,7 +4912,7 @@ compiler_joined_str(struct compiler *c, expr_ty e)
|
|||
Py_ssize_t value_count = asdl_seq_LEN(e->v.JoinedStr.values);
|
||||
if (value_count > STACK_USE_GUIDELINE) {
|
||||
_Py_DECLARE_STR(empty, "");
|
||||
ADDOP_LOAD_CONST_NEW(c, &_Py_STR(empty));
|
||||
ADDOP_LOAD_CONST_NEW(c, Py_NewRef(&_Py_STR(empty)));
|
||||
ADDOP_NAME(c, LOAD_METHOD, &_Py_ID(join), names);
|
||||
ADDOP_I(c, BUILD_LIST, 0);
|
||||
for (Py_ssize_t i = 0; i < asdl_seq_LEN(e->v.JoinedStr.values); i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue