mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
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.
This commit is contained in:
parent
ca08301ae0
commit
ad8c83ad6b
5 changed files with 11 additions and 11 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue