summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-06-27 18:39:12 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-06-27 18:39:12 (GMT)
commitfbd1523525ed385555357fab546f78e318f03f4b (patch)
treec8d91d0abc1c658a14c005b1b7ea668dc7a90751 /Python/ceval.c
parent44a98b6bf3f110c900979894ccb89753088c3aaa (diff)
downloadcpython-fbd1523525ed385555357fab546f78e318f03f4b.zip
cpython-fbd1523525ed385555357fab546f78e318f03f4b.tar.gz
cpython-fbd1523525ed385555357fab546f78e318f03f4b.tar.bz2
Issue #27352: Correct the validation of the ImportFrom AST node and simplify
the implementation of the IMPORT_NAME opcode.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r--Python/ceval.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 341d36d..2b4f7cc 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2820,21 +2820,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
Py_INCREF(func);
from = POP();
level = TOP();
- if (PyLong_AsLong(level) != -1 || PyErr_Occurred())
- args = PyTuple_Pack(5,
+ args = PyTuple_Pack(5,
name,
f->f_globals,
f->f_locals == NULL ?
Py_None : f->f_locals,
from,
level);
- else
- args = PyTuple_Pack(4,
- name,
- f->f_globals,
- f->f_locals == NULL ?
- Py_None : f->f_locals,
- from);
Py_DECREF(level);
Py_DECREF(from);
if (args == NULL) {