Commit 0810fa79 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-36389: Cleanup gc.set_threshold() (GH-12844)

Don't assign generations[2].threshold to generations[2].threshold:
useless operation.
parent aba7d662
......@@ -1374,7 +1374,7 @@ gc_set_thresh(PyObject *self, PyObject *args)
&_PyRuntime.gc.generations[1].threshold,
&_PyRuntime.gc.generations[2].threshold))
return NULL;
for (i = 2; i < NUM_GENERATIONS; i++) {
for (i = 3; i < NUM_GENERATIONS; i++) {
/* generations higher than 2 get the same threshold */
_PyRuntime.gc.generations[i].threshold = _PyRuntime.gc.generations[2].threshold;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment