Skip to content

Commit 5b82b94

Browse files
committed
change to goto error in scope var cleanup and remove uncessary comments
1 parent aff400a commit 5b82b94

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Python/codegen.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ codegen_setup_annotations_scope(compiler *c, location loc,
722722
assert(!SYMTABLE_ENTRY(c)->ste_has_docstring);
723723
_Py_DECLARE_STR(format, ".format");
724724
ADDOP_I(c, loc, LOAD_FAST, 0);
725-
ADDOP_LOAD_CONST_NEW(c, loc, value_with_fake_globals); // macro handles decref of value_with_fake_globals
725+
ADDOP_LOAD_CONST_NEW(c, loc, value_with_fake_globals);
726726
ADDOP_I(c, loc, COMPARE_OP, (Py_GT << 5) | compare_masks[Py_GT]);
727727
NEW_JUMP_TARGET_LABEL(c, body);
728728
ADDOP_JUMP(c, loc, POP_JUMP_IF_FALSE, body);
@@ -823,7 +823,7 @@ codegen_deferred_annotations_body(compiler *c, location loc,
823823

824824
VISIT(c, expr, st->v.AnnAssign.annotation);
825825
ADDOP_I(c, LOC(st), COPY, 2);
826-
ADDOP_LOAD_CONST_NEW(c, LOC(st), mangled); // macro handles decref of mangle
826+
ADDOP_LOAD_CONST_NEW(c, LOC(st), mangled);
827827
// stack now contains <annos> <name> <annos> <value>
828828
ADDOP(c, loc, STORE_SUBSCR);
829829
// stack now contains <annos>
@@ -3287,8 +3287,7 @@ codegen_nameop(compiler *c, location loc,
32873287

32883288
int scope = _PyST_GetScope(SYMTABLE_ENTRY(c), mangled);
32893289
if (scope == -1) {
3290-
Py_DECREF(mangled);
3291-
return ERROR;
3290+
goto error;
32923291
}
32933292

32943293
_PyCompile_optype optype;

0 commit comments

Comments
 (0)