Skip to content

Commit a6f65a6

Browse files
authored
gh-160679: Сombine argument conversion loops (#160838)
* refactor(ceval): combine argument conversion loops * choore(docs): remove news
1 parent 5364bdc commit a6f65a6

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎Python/ceval.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2242,15 +2242,9 @@ _PyEval_Vector(PyThreadState *tstate, PyFunctionObject *func,
22422242
/* _PyEvalFramePushAndInit consumes the references
22432243
* to func, locals and all its arguments */
22442244
Py_XINCREF(locals);
2245-
for (size_t i = 0; i < argcount; i++) {
2245+
for (size_t i = 0; i < total_args; i++) {
22462246
arguments[i] = PyStackRef_FromPyObjectNew(args[i]);
22472247
}
2248-
if (kwnames) {
2249-
Py_ssize_t kwcount = PyTuple_GET_SIZE(kwnames);
2250-
for (Py_ssize_t i = 0; i < kwcount; i++) {
2251-
arguments[i+argcount] = PyStackRef_FromPyObjectNew(args[i+argcount]);
2252-
}
2253-
}
22542248
_PyInterpreterFrame *frame = _PyEvalFramePushAndInit(
22552249
tstate, PyStackRef_FromPyObjectNew(func), locals,
22562250
arguments, argcount, kwnames, NULL);

0 commit comments

Comments
 (0)