mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
This commit is contained in:
parent
3b0cae9cc0
commit
684fd0c8ec
8 changed files with 17 additions and 20 deletions
|
@ -851,7 +851,7 @@ PyWeakref_GetObject(PyObject *ref)
|
|||
static void
|
||||
handle_callback(PyWeakReference *ref, PyObject *callback)
|
||||
{
|
||||
PyObject *cbresult = PyObject_CallFunction(callback, "O", ref);
|
||||
PyObject *cbresult = PyObject_CallFunctionObjArgs(callback, ref, NULL);
|
||||
|
||||
if (cbresult == NULL)
|
||||
PyErr_WriteUnraisable(callback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue