diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-08-14 07:52:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-08-14 07:52:18 (GMT) |
commit | 9171a8b4cea3e7b30e4f2c0a989d7f7b8ffabe73 (patch) | |
tree | 5cc9c9243ba4ef93902fafdc624e56eab3b15842 /Python/clinic | |
parent | b6f78c2755489dfcbe4898072ef0cd7dca11ff3d (diff) | |
download | cpython-9171a8b4cea3e7b30e4f2c0a989d7f7b8ffabe73.zip cpython-9171a8b4cea3e7b30e4f2c0a989d7f7b8ffabe73.tar.gz cpython-9171a8b4cea3e7b30e4f2c0a989d7f7b8ffabe73.tar.bz2 |
Issue #27574: Decreased an overhead of parsing keyword arguments in functions
implemented with using Argument Clinic.
Diffstat (limited to 'Python/clinic')
-rw-r--r-- | Python/clinic/bltinmodule.c.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h index 529274f..4c44340 100644 --- a/Python/clinic/bltinmodule.c.h +++ b/Python/clinic/bltinmodule.c.h @@ -159,7 +159,8 @@ static PyObject * builtin_compile(PyObject *module, PyObject *args, PyObject *kwargs) { PyObject *return_value = NULL; - static char *_keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", NULL}; + static const char * const _keywords[] = {"source", "filename", "mode", "flags", "dont_inherit", "optimize", NULL}; + static _PyArg_Parser _parser = {"OO&s|iii:compile", _keywords, 0}; PyObject *source; PyObject *filename; const char *mode; @@ -167,7 +168,7 @@ builtin_compile(PyObject *module, PyObject *args, PyObject *kwargs) int dont_inherit = 0; int optimize = -1; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO&s|iii:compile", _keywords, + if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser, &source, PyUnicode_FSDecoder, &filename, &mode, &flags, &dont_inherit, &optimize)) { goto exit; } @@ -673,4 +674,4 @@ builtin_issubclass(PyObject *module, PyObject *args) exit: return return_value; } -/*[clinic end generated code: output=6ab37e6c6d2e7b19 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=790cb3d26531dfda input=a9049054013a1b77]*/ |