summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
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 /Python/ceval.c
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 'Python/ceval.c')
-rw-r--r--Python/ceval.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 149b88e..56cd9ad 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1974,11 +1974,8 @@ _PyEvalFramePushAndInit(PyThreadState *tstate, PyFunctionObject *func,
if (frame == NULL) {
goto fail;
}
- _PyFrame_InitializeSpecials(frame, func, locals, code);
+ _PyFrame_Initialize(frame, func, locals, code, 0);
PyObject **localsarray = &frame->localsplus[0];
- for (int i = 0; i < code->co_nlocalsplus; i++) {
- localsarray[i] = NULL;
- }
if (initialize_locals(tstate, func, localsarray, args, argcount, kwnames)) {
assert(frame->owner != FRAME_OWNED_BY_GENERATOR);
_PyEvalFrameClearAndPop(tstate, frame);