From ad8c83ad6b91bebbc124c0c36e67b9836ca3d90f Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 5 Sep 2016 17:53:15 -0700 Subject: Avoid inefficient way to call functions without argument Don't pass "()" format to PyObject_CallXXX() to call a function without argument: pass NULL as the format string instead. It avoids to have to parse a string to produce 0 argument. --- Python/modsupport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/modsupport.c') diff --git a/Python/modsupport.c b/Python/modsupport.c index 4911f06e44..37c0ce7864 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -468,7 +468,7 @@ va_build_value(const char *format, va_list va, int flags) int n = countformat(f, '\0'); va_list lva; - Py_VA_COPY(lva, va); + Py_VA_COPY(lva, va); if (n < 0) return NULL; -- cgit v1.2.1