diff options
author | Mark Shannon <mark@hotpy.org> | 2023-03-13 18:35:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-13 18:35:37 (GMT) |
commit | 2d370da5702f07d044f0e612df68172852b89f42 (patch) | |
tree | a35c9fc102a39fc70ae187e1be07ea786298bccc /Python/ceval.c | |
parent | 634cb61909b1392f0eef3e749931777adb54f16e (diff) | |
download | cpython-2d370da5702f07d044f0e612df68172852b89f42.zip cpython-2d370da5702f07d044f0e612df68172852b89f42.tar.gz cpython-2d370da5702f07d044f0e612df68172852b89f42.tar.bz2 |
GH-100987: Don't cache references to the names and consts array in `_PyEval_EvalFrameDefault`. (#102640)
* Rename local variables, names and consts, from the interpeter loop. Will allow non-code objects in frames for better introspection of C builtins and extensions.
* Remove unused dummy variables.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 9223551..7d60cf9 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -773,18 +773,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int /* Local "register" variables. * These are cached values from the frame and code object. */ - PyObject *names; - PyObject *consts; _Py_CODEUNIT *next_instr; PyObject **stack_pointer; /* Sets the above local variables from the frame */ #define SET_LOCALS_FROM_FRAME() \ - { \ - PyCodeObject *co = frame->f_code; \ - names = co->co_names; \ - consts = co->co_consts; \ - } \ assert(_PyInterpreterFrame_LASTI(frame) >= -1); \ /* Jump back to the last instruction executed... */ \ next_instr = frame->prev_instr + 1; \ |