diff options
| author | Raymond Hettinger <python@rcn.com> | 2004-07-02 06:41:07 +0000 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2004-07-02 06:41:07 +0000 |
| commit | faaf73902c41d60df01ecea44c75e21de9ea694b (patch) | |
| tree | ff615abcabe1b16fc7674d032932846da56daf02 /Objects/object.c | |
| parent | 103cf1fd3cd185d5b30d561b6bfa3344587fbfa9 (diff) | |
| download | cpython-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.c | 2 |
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; } |
