summaryrefslogtreecommitdiffstats
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-25 19:15:31 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-25 19:15:31 (GMT)
commit684fd0c8ec0bad54d3ff39ae15873f80e119478b (patch)
tree56596aed7bfd401ebe049e566201f75f88150b27 /Objects/weakrefobject.c
parent3b0cae9cc06374eb7a7159f1328ec700208d6109 (diff)
downloadcpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.zip
cpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.tar.gz
cpython-684fd0c8ec0bad54d3ff39ae15873f80e119478b.tar.bz2
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index a8ab56e..bbeb3c0 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -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);