summaryrefslogtreecommitdiff
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-16 17:01:09 +0000
committerGuido van Rossum <guido@python.org>2002-08-16 17:01:09 +0000
commit84b2bed4359e27070fe2eac4b464d4a1bc6e150d (patch)
tree0d1e50962419f5bf7e69bbc899b29a8d762e5d08 /Objects/abstract.c
parentc13f724af0a09d515efae57b902a1270b6aba4ac (diff)
downloadcpython-git-84b2bed4359e27070fe2eac4b464d4a1bc6e150d.tar.gz
Squash a few calls to the hideously expensive PyObject_CallObject(o,a)
-- replace then with slightly faster PyObject_Call(o,a,NULL). (The difference is that the latter requires a to be a tuple; the former allows other values and wraps them in a tuple if necessary; it involves two more levels of C function calls to accomplish all that.)
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index fc73a9f0ce..9940fd3c95 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -1727,7 +1727,7 @@ PyObject_CallFunction(PyObject *callable, char *format, ...)
return NULL;
args = a;
}
- retval = PyObject_CallObject(callable, args);
+ retval = PyObject_Call(callable, args, NULL);
Py_DECREF(args);
@@ -1774,7 +1774,7 @@ PyObject_CallMethod(PyObject *o, char *name, char *format, ...)
args = a;
}
- retval = PyObject_CallObject(func, args);
+ retval = PyObject_Call(func, args, NULL);
Py_DECREF(args);
Py_DECREF(func);