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

Skip to content

Commit 5053efc

Browse files
committed
In BUILD_LIST, use PyList_SET_ITEM() instead of PyList_SetItem(); and
get rid of redundant error check.
1 parent c964179 commit 5053efc

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Python/ceval.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,9 +1360,7 @@ eval_code2(co, globals, locals,
13601360
if (x != NULL) {
13611361
for (; --oparg >= 0;) {
13621362
w = POP();
1363-
err = PyList_SetItem(x, oparg, w);
1364-
if (err != 0)
1365-
break;
1363+
PyList_SET_ITEM(x, oparg, w);
13661364
}
13671365
PUSH(x);
13681366
continue;

0 commit comments

Comments
 (0)