Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9496261

Browse files
committed
Adjust usage of compiler_use_new_block to its return type.
1 parent 461aa5b commit 9496261

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Python/compile.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ compiler_enter_scope(struct compiler *c, identifier name, void *key,
11241124
c->u = u;
11251125

11261126
c->c_nestlevel++;
1127-
if (compiler_use_new_block(c) < 0)
1127+
if (compiler_use_new_block(c) == NULL)
11281128
return 0;
11291129

11301130
return 1;
@@ -2899,7 +2899,7 @@ compiler_boolop(struct compiler *c, expr_ty e)
28992899
else
29002900
jumpi = JUMP_IF_TRUE;
29012901
end = compiler_new_block(c);
2902-
if (end < 0)
2902+
if (end == NULL)
29032903
return 0;
29042904
s = e->v.BoolOp.values;
29052905
n = asdl_seq_LEN(s) - 1;

0 commit comments

Comments
 (0)