Skip to content

Commit

Permalink
Use memcpy in initialize_locals
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Aug 29, 2024
1 parent 58ce131 commit 1021191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,8 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject *func,
}
for (j = 0; j < n; j++) {
assert(PyStackRef_IsNull(localsplus[j]));
localsplus[j] = args[j];
}
memcpy(localsplus, args, sizeof(_PyStackRef) * n);

/* Pack other positional arguments into the *args argument */
if (co->co_flags & CO_VARARGS) {
Expand Down

0 comments on commit 1021191

Please sign in to comment.