]> granicus.if.org Git - python/commitdiff
In BUILD_LIST, use PyList_SET_ITEM() instead of PyList_SetItem(); and
authorGuido van Rossum <guido@python.org>
Tue, 4 Aug 1998 15:27:50 +0000 (15:27 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 4 Aug 1998 15:27:50 +0000 (15:27 +0000)
get rid of redundant error check.

Python/ceval.c

index 4331786aa71d60acf780817047cac75471d6bd0d..ff5ee509f614dc17d11906466481abe58313def5 100644 (file)
@@ -1360,9 +1360,7 @@ eval_code2(co, globals, locals,
                        if (x != NULL) {
                                for (; --oparg >= 0;) {
                                        w = POP();
-                                       err = PyList_SetItem(x, oparg, w);
-                                       if (err != 0)
-                                               break;
+                                       PyList_SET_ITEM(x, oparg, w);
                                }
                                PUSH(x);
                                continue;