Skip to content

Commit 8e7acf6

Browse files
committed
int --> Py_ssize_t. renamed last_location_in_body --> location_of_last_executing_statement
1 parent 80393a3 commit 8e7acf6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Python/compile.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3272,9 +3272,9 @@ compiler_continue(struct compiler *c, location loc)
32723272

32733273

32743274
static location
3275-
last_location_in_body(asdl_stmt_seq *stmts)
3275+
location_of_last_executing_statement(asdl_stmt_seq *stmts)
32763276
{
3277-
for (int i = asdl_seq_LEN(stmts) - 1; i >= 0; i++) {
3277+
for (Py_ssize_t i = asdl_seq_LEN(stmts) - 1; i >= 0; i++) {
32783278
location loc = LOC((stmt_ty)asdl_seq_GET(stmts, i));
32793279
if (loc.lineno > 0) {
32803280
return loc;
@@ -3351,7 +3351,7 @@ compiler_try_finally(struct compiler *c, stmt_ty s)
33513351
if (!compiler_push_fblock(c, loc, FINALLY_END, end, NO_LABEL, NULL))
33523352
return 0;
33533353
VISIT_SEQ(c, stmt, s->v.Try.finalbody);
3354-
loc = last_location_in_body(s->v.Try.finalbody);
3354+
loc = location_of_last_executing_statement(s->v.Try.finalbody);
33553355
compiler_pop_fblock(c, FINALLY_END, end);
33563356

33573357
ADDOP_I(c, loc, RERAISE, 0); // CHANGED
@@ -3404,7 +3404,7 @@ compiler_try_star_finally(struct compiler *c, stmt_ty s)
34043404
return 0;
34053405
}
34063406
VISIT_SEQ(c, stmt, s->v.TryStar.finalbody);
3407-
loc = last_location_in_body(s->v.Try.finalbody);
3407+
loc = location_of_last_executing_statement(s->v.Try.finalbody);
34083408

34093409
compiler_pop_fblock(c, FINALLY_END, end);
34103410
ADDOP_I(c, loc, RERAISE, 0); // CHANGED

0 commit comments

Comments
 (0)