summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-02-03 18:36:28 (GMT)
committerGitHub <noreply@github.com>2022-02-03 18:36:28 (GMT)
commitda4d4ec1851714bb56a5e8d0c1cd5bf9842b4cee (patch)
tree0a59b7362a584322ba0042f411b28555353b4a67 /Python/pystate.c
parent2d080347d74078a55c47715d232d1ab8dc8cd603 (diff)
downloadcpython-da4d4ec1851714bb56a5e8d0c1cd5bf9842b4cee.zip
cpython-da4d4ec1851714bb56a5e8d0c1cd5bf9842b4cee.tar.gz
cpython-da4d4ec1851714bb56a5e8d0c1cd5bf9842b4cee.tar.bz2
Pass reference to func, as well as args, when pushing frame. (GH-31100)
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 7746794..a85460c 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -2212,26 +2212,6 @@ _PyThreadState_BumpFramePointerSlow(PyThreadState *tstate, size_t size)
return (InterpreterFrame *)base;
}
-
-InterpreterFrame *
-_PyThreadState_PushFrame(PyThreadState *tstate, PyFunctionObject *func, PyObject *locals)
-{
- PyCodeObject *code = (PyCodeObject *)func->func_code;
- int nlocalsplus = code->co_nlocalsplus;
- size_t size = nlocalsplus + code->co_stacksize +
- FRAME_SPECIALS_SIZE;
- CALL_STAT_INC(frames_pushed);
- InterpreterFrame *frame = _PyThreadState_BumpFramePointer(tstate, size);
- if (frame == NULL) {
- return NULL;
- }
- _PyFrame_InitializeSpecials(frame, func, locals, nlocalsplus);
- for (int i=0; i < nlocalsplus; i++) {
- frame->localsplus[i] = NULL;
- }
- return frame;
-}
-
void
_PyThreadState_PopFrame(PyThreadState *tstate, InterpreterFrame * frame)
{