]> granicus.if.org Git - python/commitdiff
In-line the code in range() to set the list items; there's really no
authorGuido van Rossum <guido@python.org>
Thu, 23 Apr 1998 21:46:19 +0000 (21:46 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 23 Apr 1998 21:46:19 +0000 (21:46 +0000)
need to call PyList_SetItem(v,i,w) when PyList_GET_ITEM(v,i)=w {sic}
will do.

Python/bltinmodule.c

index 32973327d4efe319b44231381db3b90cf61f8d5a..8a4215bad5c984a34c6cf9b60c72da5ff128dc55 100644 (file)
@@ -1282,7 +1282,7 @@ builtin_range(self, args)
                        Py_DECREF(v);
                        return NULL;
                }
-               PyList_SetItem(v, i, w);
+               PyList_GET_ITEM(v, i) = w;
                ilow += istep;
        }
        return v;