mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
gh-74929: Implement PEP 667 (GH-115153)
This commit is contained in:
parent
1ab6356ebe
commit
b034f14a4b
19 changed files with 921 additions and 257 deletions
|
@ -1022,13 +1022,6 @@ static PyObject *
|
|||
call_trampoline(PyThreadState *tstate, PyObject* callback,
|
||||
PyFrameObject *frame, int what, PyObject *arg)
|
||||
{
|
||||
/* Discard any previous modifications the frame's fast locals */
|
||||
if (frame->f_fast_as_locals) {
|
||||
if (PyFrame_FastToLocalsWithError(frame) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* call the Python-level function */
|
||||
if (arg == NULL) {
|
||||
arg = Py_None;
|
||||
|
@ -1036,7 +1029,6 @@ call_trampoline(PyThreadState *tstate, PyObject* callback,
|
|||
PyObject *args[3] = {(PyObject *)frame, whatstrings[what], arg};
|
||||
PyObject *result = _PyObject_VectorcallTstate(tstate, callback, args, 3, NULL);
|
||||
|
||||
PyFrame_LocalsToFast(frame, 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue