diff options
author | Raymond Hettinger <python@rcn.com> | 2016-09-08 21:45:40 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2016-09-08 21:45:40 (GMT) |
commit | 4c483ad52b6f7760a0a861badae6c803d6ce8590 (patch) | |
tree | b4a4883562a12fc4accd126e967b840ff1518bb0 /Python/ceval.c | |
parent | 33df0c3fb6c48a0434f407732d2a50102923db51 (diff) | |
download | cpython-4c483ad52b6f7760a0a861badae6c803d6ce8590.zip cpython-4c483ad52b6f7760a0a861badae6c803d6ce8590.tar.gz cpython-4c483ad52b6f7760a0a861badae6c803d6ce8590.tar.bz2 |
Merge
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 9109ea5..0c3ef7b 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2619,14 +2619,16 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) TARGET(BUILD_SET) { PyObject *set = PySet_New(NULL); int err = 0; + int i; if (set == NULL) goto error; - while (--oparg >= 0) { - PyObject *item = POP(); + for (i = oparg; i > 0; i--) { + PyObject *item = PEEK(i); if (err == 0) err = PySet_Add(set, item); Py_DECREF(item); } + STACKADJ(-oparg); if (err != 0) { Py_DECREF(set); goto error; |