Skip to content

Commit a7142d5

Browse files
committed
add commented fix if merging after gh-124652
1 parent 64c889b commit a7142d5

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Modules/_functoolsmodule.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,19 @@ partial_vectorcall(partialobject *pto, PyObject *const *args,
391391
pto_nargs, NULL);
392392
}
393393

394+
// TO BE ADDED ON MERGE TO MAIN
395+
// IF https://github.com/python/cpython/pull/124788
396+
// IS MERGED BEFORE THIS
397+
// /* Fast path if all Placeholders */
398+
// if (pto_nargs == pto_phcount) {
399+
// /* NOTE: Without this, following single argument Fast Path
400+
// * is incorrect */
401+
// return _PyObject_VectorcallTstate(tstate, pto->fn,
402+
// args, nargs, kwnames);
403+
// }
404+
394405
/* Use PY_VECTORCALL_ARGUMENTS_OFFSET to prepend a single
395-
* positional argument.
396-
* NOTE: Could add (Placeholder, arg) case in similar manner */
406+
* positional argument. */
397407
if (pto_nargs == 1 && (nargsf & PY_VECTORCALL_ARGUMENTS_OFFSET)) {
398408
PyObject **newargs = (PyObject **)args - 1;
399409
PyObject *tmp = newargs[0];

0 commit comments

Comments
 (0)