summaryrefslogtreecommitdiff
path: root/Objects/object.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-07-02 06:41:07 +0000
committerRaymond Hettinger <python@rcn.com>2004-07-02 06:41:07 +0000
commitfaaf73902c41d60df01ecea44c75e21de9ea694b (patch)
treeff615abcabe1b16fc7674d032932846da56daf02 /Objects/object.c
parent103cf1fd3cd185d5b30d561b6bfa3344587fbfa9 (diff)
downloadcpython-faaf73902c41d60df01ecea44c75e21de9ea694b.tar.gz
SF Bug #215126: Over restricted type checking on eval() function
The builtin eval() function now accepts any mapping for the locals argument. Time sensitive steps guarded by PyDict_CheckExact() to keep from slowing down the normal case. My timings so no measurable impact.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 22196d714f..1c0efdd305 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1621,7 +1621,7 @@ PyObject_Dir(PyObject *arg)
PyObject *locals = PyEval_GetLocals();
if (locals == NULL)
goto error;
- result = PyDict_Keys(locals);
+ result = PyMapping_Keys(locals);
if (result == NULL)
goto error;
}