From 3f6ef1e99f7c517a21d4f53c63b0aeef7e5b5b2c Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 1 Dec 2016 14:51:04 +0100 Subject: 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. --- Modules/readline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/readline.c') diff --git a/Modules/readline.c b/Modules/readline.c index 3b94d4a0d1..389954f087 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -868,7 +868,7 @@ on_hook(PyObject *func) int result = 0; if (func != NULL) { PyObject *r; - r = PyObject_CallFunction(func, NULL); + r = _PyObject_CallNoArg(func); if (r == NULL) goto error; if (r == Py_None) -- cgit v1.2.1