summaryrefslogtreecommitdiffstats
path: root/Python/bltinmodule.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-06 13:44:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-07-06 13:44:41 (GMT)
commit513ffe81122274973d2adeff13345589d4313d47 (patch)
tree321c72ea12517785553e6fbf224293e88ffda4a8 /Python/bltinmodule.c
parent2f55eb4ccad92efeb1d422c96aacd2cfa659c5c6 (diff)
downloadcpython-513ffe81122274973d2adeff13345589d4313d47.zip
cpython-513ffe81122274973d2adeff13345589d4313d47.tar.gz
cpython-513ffe81122274973d2adeff13345589d4313d47.tar.bz2
* Fix missing return after error message is set.
* Add a test case that would have caught it.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r--Python/bltinmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index f4f8b7a..3604601 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -459,12 +459,13 @@ builtin_eval(PyObject *self, PyObject *args)
return NULL;
if (locals != Py_None && !PyMapping_Check(locals)) {
PyErr_SetString(PyExc_TypeError, "locals must be a mapping");
- return NULL;
+ return NULL;
}
if (globals != Py_None && !PyDict_Check(globals)) {
PyErr_SetString(PyExc_TypeError, PyMapping_Check(globals) ?
"globals must be a real dict; try eval(expr, {}, mapping)"
: "globals must be a dict");
+ return NULL;
}
if (globals == Py_None) {
globals = PyEval_GetGlobals();