Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor func signature down
  • Loading branch information
A0su committed Apr 3, 2026
commit 491bf1cd6ef8bf6b50393318c18bd25f3ab650d8
12 changes: 6 additions & 6 deletions Python/codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,8 @@ codegen_leave_annotations_scope(compiler *c, location loc)
}

static int
codegen_deferred_annotations_entry(compiler *c, location loc,
PyObject *conditional_annotation_indices, int scope_type, stmt_ty st, PyObject *mangled, Py_ssize_t i)
codegen_deferred_annotations_entry(compiler *c, location loc, int scope_type, stmt_ty st, PyObject *mangled, PyObject *cond_index)
{
PyObject *cond_index = PyList_GET_ITEM(conditional_annotation_indices, i);
assert(PyLong_CheckExact(cond_index));
long idx = PyLong_AS_LONG(cond_index);
NEW_JUMP_TARGET_LABEL(c, not_set);

Expand Down Expand Up @@ -829,13 +826,16 @@ codegen_deferred_annotations_body(compiler *c, location loc,
if (st == NULL) {
return ERROR;
}

PyObject *cond_index = PyList_GET_ITEM(conditional_annotation_indices, i);
assert(PyLong_CheckExact(cond_index));

PyObject *mangled = _PyCompile_Mangle(c, st->v.AnnAssign.target->v.Name.id);
if (!mangled) {
return ERROR;
}

int ret = codegen_deferred_annotations_entry(c, loc, conditional_annotation_indices,
scope_type, st, mangled, i);
int ret = codegen_deferred_annotations_entry(c, loc, scope_type, st, mangled, cond_index);
Py_DECREF(mangled);
RETURN_IF_ERROR(ret);
}
Expand Down
Loading