summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-01-06 14:55:56 (GMT)
committerGitHub <noreply@github.com>2023-01-06 14:55:56 (GMT)
commit15c44789bb125b93e96815a336ec73423c47508e (patch)
treed8962fa33de6dc997e397a8856eb70d72a542ba7 /Objects
parent78068126a1f2172ff61a0871ba43d8530bc73905 (diff)
downloadcpython-15c44789bb125b93e96815a336ec73423c47508e.zip
cpython-15c44789bb125b93e96815a336ec73423c47508e.tar.gz
cpython-15c44789bb125b93e96815a336ec73423c47508e.tar.bz2
gh-100758: Refactor initialisation of frame headers into a single function (_PyFrame_Initialize) (GH-100759)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/frameobject.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 8d7ee4b..ebe3bfe 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1011,12 +1011,9 @@ static void
init_frame(_PyInterpreterFrame *frame, PyFunctionObject *func, PyObject *locals)
{
PyCodeObject *code = (PyCodeObject *)func->func_code;
- _PyFrame_InitializeSpecials(frame, (PyFunctionObject*)Py_NewRef(func),
- Py_XNewRef(locals), code);
+ _PyFrame_Initialize(frame, (PyFunctionObject*)Py_NewRef(func),
+ Py_XNewRef(locals), code, 0);
frame->previous = NULL;
- for (Py_ssize_t i = 0; i < code->co_nlocalsplus; i++) {
- frame->localsplus[i] = NULL;
- }
}
PyFrameObject*