Skip to content

Commit

Permalink
pythonGH-94851: fix immortal objects refcounting in compiler (pythong…
Browse files Browse the repository at this point in the history
…h-95040)

(cherry picked from commit 7476154)

Co-authored-by: Kumar Aditya <[email protected]>
  • Loading branch information
kumaraditya303 authored and miss-islington committed Jul 20, 2022
1 parent 1093804 commit b745b27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit b745b27

Please sign in to comment.