summaryrefslogtreecommitdiffstats
path: root/Modules/pyexpat.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-12-01 13:51:04 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-12-01 13:51:04 (GMT)
commit4778eab1f2b70cd2431252cae987e4adb3729ce8 (patch)
treeda490c7fb2cf97449a8f17ae3b053e49a7c9b8ac /Modules/pyexpat.c
parent842cfff3215aaebf788d782e40a61fe421fb2a5d (diff)
downloadcpython-4778eab1f2b70cd2431252cae987e4adb3729ce8.zip
cpython-4778eab1f2b70cd2431252cae987e4adb3729ce8.tar.gz
cpython-4778eab1f2b70cd2431252cae987e4adb3729ce8.tar.bz2
Replace PyObject_CallFunction() with fastcall
Replace PyObject_CallFunction(func, "O", arg) and PyObject_CallFunction(func, "O", arg, NULL) with _PyObject_CallArg1(func, arg) Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func) _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack.
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 b3259d5..541eee7 100644
--- a/Modules/pyexpat.c
+++ b/Modules/pyexpat.c
@@ -119,7 +119,7 @@ set_error(xmlparseobject *self, enum XML_Error code)
XML_ErrorString(code), lineno, column);
if (buffer == NULL)
return NULL;
- err = PyObject_CallFunction(ErrorObject, "O", buffer);
+ err = _PyObject_CallArg1(ErrorObject, buffer);
Py_DECREF(buffer);
if ( err != NULL
&& set_error_attr(err, "code", code)