8000 gh-127065: Make methodcaller thread-safe and re-entrant by eendebakpt · Pull Request #127245 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-127065: Make methodcaller thread-safe and re-entrant #127245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
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
skip check on zero size for memcpy
  • Loading branch information
eendebakpt committed Dec 1, 2024
commit b4f30d39728614d29215ffe3d5bbd4dae5e25a15
5 changes: 1 addition & 4 deletions Modules/_operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1644,11 +1644,8 @@ static int _methodcaller_initialize_vectorcall(methodcallerobject* mc)
PyErr_NoMemory();
return -1;
}
/* The first item of vectorcall_args will be filled with obj later */
if (nargs > 0) {
memcpy(mc->vectorcall_args, PySequence_Fast_ITEMS(args),
memcpy(mc->vectorcall_args, PySequence_Fast_ITEMS(args),
nargs * sizeof(PyObject*));
}
if (kwds && PyDict_Size(kwds)) {
const Py_ssize_t nkwds = PyDict_Size(kwds);
mc->vectorcall_kwnames = PyTuple_New(nkwds);
Expand Down
0