diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 17:53:15 -0700 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-09-05 17:53:15 -0700 |
commit | b10682a8d65eacac79b39a62ff45a15e0ac95f05 (patch) | |
tree | 043a074b65bfe0587a7843469a9f280963ec8f0f /Python/modsupport.c | |
parent | d08cbb8120aa7924107361ab12345b5e70628d6b (diff) | |
download | cpython-b10682a8d65eacac79b39a62ff45a15e0ac95f05.tar.gz |
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.
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r-- | Python/modsupport.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |