summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-16 17:01:09 (GMT)
committerGuido van Rossum <guido@python.org>2002-08-16 17:01:09 (GMT)
commit84b2bed4359e27070fe2eac4b464d4a1bc6e150d (patch)
tree0d1e50962419f5bf7e69bbc899b29a8d762e5d08 /Modules/pyexpat.c
parentc13f724af0a09d515efae57b902a1270b6aba4ac (diff)
downloadcpython-84b2bed4359e27070fe2eac4b464d4a1bc6e150d.zip
cpython-84b2bed4359e27070fe2eac4b464d4a1bc6e150d.tar.gz
cpython-84b2bed4359e27070fe2eac4b464d4a1bc6e150d.tar.bz2
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 'Modules/pyexpat.c')
-rw-r--r--Modules/pyexpat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
index fc419b1..8b73e1e 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -829,7 +829,7 @@ readinst(char *buf, int buf_size, PyObject *meth)
PyTuple_SET_ITEM(arg, 0, bytes);
- if ((str = PyObject_CallObject(meth, arg)) == NULL)
+ if ((str = PyObject_Call(meth, arg, NULL)) == NULL)
goto finally;
/* XXX what to do if it returns a Unicode string? */