Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index c9edae6..e33197e 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -3267,8 +3267,8 @@
&& (pickler != NULL)) {
PyObject *res;
- res = PyObject_CallFunction(func, "OOO", &PyST_Type, pickler,
- pickle_constructor);
+ res = PyObject_CallFunctionObjArgs(func, &PyST_Type, pickler,
+ pickle_constructor, NULL);
Py_XDECREF(res);
}
Py_XDECREF(func);