aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Modules/_io/clinic/_iomodule.c.h
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_io/clinic/_iomodule.c.h')
-rw-r--r--Modules/_io/clinic/_iomodule.c.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h
index 6c88e32e5ac..50891c59d11 100644
--- a/Modules/_io/clinic/_iomodule.c.h
+++ b/Modules/_io/clinic/_iomodule.c.h
@@ -138,7 +138,8 @@ static PyObject *
_io_open(PyObject *module, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
- static char *_keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
+ static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
+ static _PyArg_Parser _parser = {"O|sizzziO:open", _keywords, 0};
PyObject *file;
const char *mode = "r";
int buffering = -1;
@@ -148,12 +149,13 @@ _io_open(PyObject *module, PyObject *args, PyObject *kwargs)
int closefd = 1;
PyObject *opener = Py_None;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|sizzziO:open", _keywords,
- &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener))
+ if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener)) {
goto exit;
+ }
return_value = _io_open_impl(module, file, mode, buffering, encoding, errors, newline, closefd, opener);
exit:
return return_value;
}
-/*[clinic end generated code: output=bc2c003cb7daeafe input=a9049054013a1b77]*/
+/*[clinic end generated code: output=14769629391a3130 input=a9049054013a1b77]*/