diff options
author | Raymond Hettinger <python@rcn.com> | 2004-07-02 06:41:07 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-07-02 06:41:07 (GMT) |
commit | 214b1c3aaea3e83302df9ea37a37b3c7548b92b1 (patch) | |
tree | 4ddeda01308aec48c7edda3188a4aad84dc9435b /Objects/object.c | |
parent | 78bace7442bb89aa005950a1e37f71d4704d4cb6 (diff) | |
download | cpython-214b1c3aaea3e83302df9ea37a37b3c7548b92b1.zip cpython-214b1c3aaea3e83302df9ea37a37b3c7548b92b1.tar.gz cpython-214b1c3aaea3e83302df9ea37a37b3c7548b92b1.tar.bz2 |
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 22196d7..1c0efdd 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; } |