Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comments
  • Loading branch information
eendebakpt committed Dec 3, 2024
commit bc3fe2a1688291995978eb71b82f68797461f0fb
4 changes: 3 additions & 1 deletion Modules/_operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,10 @@ static int _methodcaller_initialize_vectorcall(methodcallerobject* mc)
PyErr_NoMemory();
return -1;
}
// the objects in mc->vectorcall_args have references borrowed
// from mc->args and the keys from mc->kwds
memcpy(mc->vectorcall_args, _PyTuple_ITEMS(args),
nargs * sizeof(PyObject*));
nargs * sizeof(PyObject*)); // borrowed references
if (kwds && PyDict_Size(kwds)) {
const Py_ssize_t nkwds = PyDict_Size(kwds);
mc->vectorcall_kwnames = PyTuple_New(nkwds);
Expand Down