Commit 6969eaf4 authored by Serhiy Storchaka's avatar Serhiy Storchaka Committed by GitHub

bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)

the bare METH_FASTCALL be used for functions with positional-only
parameters.
parent aa0aa049
......@@ -16,10 +16,12 @@ PyAPI_DATA(PyTypeObject) PyCFunction_Type;
#define PyCFunction_Check(op) (Py_TYPE(op) == &PyCFunction_Type)
typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
typedef PyObject *(*_PyCFunctionFast) (PyObject *self, PyObject **args,
Py_ssize_t nargs, PyObject *kwnames);
typedef PyObject *(*_PyCFunctionFast) (PyObject *, PyObject **, Py_ssize_t);
typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,
PyObject *);
typedef PyObject *(*_PyCFunctionFastWithKeywords) (PyObject *,
PyObject **, Py_ssize_t,
PyObject *);
typedef PyObject *(*PyNoArgsFunction)(PyObject *);
PyAPI_FUNC(PyCFunction) PyCFunction_GetFunction(PyObject *);
......
......@@ -912,14 +912,10 @@ done:
}
static PyObject *
deque_rotate(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
PyObject *kwnames)
deque_rotate(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t n=1;
if (!_PyArg_NoStackKeywords("rotate", kwnames)) {
return NULL;
}
if (!_PyArg_ParseStack(args, nargs, "|n:rotate", &n)) {
return NULL;
}
......@@ -1052,8 +1048,7 @@ deque_len(dequeobject *deque)
}
static PyObject *
deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
PyObject *kwnames)
deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t i, n, start=0, stop=Py_SIZE(deque);
PyObject *v, *item;
......@@ -1062,9 +1057,6 @@ deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
size_t start_state = deque->state;
int cmp;
if (!_PyArg_NoStackKeywords("index", kwnames)) {
return NULL;
}
if (!_PyArg_ParseStack(args, nargs, "O|O&O&:index", &v,
_PyEval_SliceIndexNotNone, &start,
_PyEval_SliceIndexNotNone, &stop)) {
......@@ -1133,17 +1125,13 @@ PyDoc_STRVAR(index_doc,
*/
static PyObject *
deque_insert(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
PyObject *kwnames)
deque_insert(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t index;
Py_ssize_t n = Py_SIZE(deque);
PyObject *value;
PyObject *rv;
if (!_PyArg_NoStackKeywords("insert", kwnames)) {
return NULL;
}
if (!_PyArg_ParseStack(args, nargs, "nO:insert", &index, &value)) {
return NULL;
}
......
......@@ -2774,7 +2774,7 @@ typedef struct {
} XMLParserObject;
static PyObject*
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames);
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs);
static PyObject *
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
PyObject *pubid, PyObject *system);
......
......@@ -967,7 +967,7 @@ generate_hash_name_list(void)
/* a PyMethodDef structure for the constructor */
#define CONSTRUCTOR_METH_DEF(NAME) \
{"openssl_" #NAME, (PyCFunction)EVP_new_ ## NAME, METH_FASTCALL, \
{"openssl_" #NAME, (PyCFunction)EVP_new_ ## NAME, METH_FASTCALL | METH_KEYWORDS, \
PyDoc_STR("Returns a " #NAME \
" hash object; optionally initialized with a string") \
}
......
......@@ -127,7 +127,7 @@ PyDoc_STRVAR(_io_open__doc__,
"opened in a binary mode.");
#define _IO_OPEN_METHODDEF \
{"open", (PyCFunction)_io_open, METH_FASTCALL, _io_open__doc__},
{"open", (PyCFunction)_io_open, METH_FASTCALL|METH_KEYWORDS, _io_open__doc__},
static PyObject *
_io_open_impl(PyObject *module, PyObject *file, const char *mode,
......@@ -158,4 +158,4 @@ _io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
exit:
return return_value;
}
/*[clinic end generated code: output=e6011c784fe6589b input=a9049054013a1b77]*/
/*[clinic end generated code: output=7e0ab289d8465580 input=a9049054013a1b77]*/
......@@ -97,15 +97,11 @@ static PyObject *
_io__Buffered_peek_impl(buffered *self, Py_ssize_t size);
static PyObject *
_io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_peek(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = 0;
if (!_PyArg_NoStackKeywords("peek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:peek",
&size)) {
goto exit;
......@@ -128,15 +124,11 @@ static PyObject *
_io__Buffered_read_impl(buffered *self, Py_ssize_t n);
static PyObject *
_io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_read(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &n)) {
goto exit;
......@@ -159,15 +151,11 @@ static PyObject *
_io__Buffered_read1_impl(buffered *self, Py_ssize_t n);
static PyObject *
_io__Buffered_read1(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_read1(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
if (!_PyArg_NoStackKeywords("read1", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:read1",
&n)) {
goto exit;
......@@ -252,15 +240,11 @@ static PyObject *
_io__Buffered_readline_impl(buffered *self, Py_ssize_t size);
static PyObject *
_io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_readline(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:readline",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -283,16 +267,12 @@ static PyObject *
_io__Buffered_seek_impl(buffered *self, PyObject *targetobj, int whence);
static PyObject *
_io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_seek(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *targetobj;
int whence = 0;
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O|i:seek",
&targetobj, &whence)) {
goto exit;
......@@ -315,15 +295,11 @@ static PyObject *
_io__Buffered_truncate_impl(buffered *self, PyObject *pos);
static PyObject *
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *pos = Py_None;
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "truncate",
0, 1,
&pos)) {
......@@ -500,4 +476,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=4f7490f82427c63b input=a9049054013a1b77]*/
/*[clinic end generated code: output=2b817df0bf814ddc input=a9049054013a1b77]*/
......@@ -164,15 +164,11 @@ static PyObject *
_io_BytesIO_read_impl(bytesio *self, Py_ssize_t size);
static PyObject *
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -199,15 +195,11 @@ static PyObject *
_io_BytesIO_read1_impl(bytesio *self, Py_ssize_t size);
static PyObject *
_io_BytesIO_read1(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_read1(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("read1", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read1",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -235,15 +227,11 @@ static PyObject *
_io_BytesIO_readline_impl(bytesio *self, Py_ssize_t size);
static PyObject *
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:readline",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -271,15 +259,11 @@ static PyObject *
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
static PyObject *
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *arg = Py_None;
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "readlines",
0, 1,
&arg)) {
......@@ -342,15 +326,11 @@ static PyObject *
_io_BytesIO_truncate_impl(bytesio *self, Py_ssize_t size);
static PyObject *
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = self->pos;
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:truncate",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -380,16 +360,12 @@ static PyObject *
_io_BytesIO_seek_impl(bytesio *self, Py_ssize_t pos, int whence);
static PyObject *
_io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_BytesIO_seek(bytesio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t pos;
int whence = 0;
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "n|i:seek",
&pos, &whence)) {
goto exit;
......@@ -468,4 +444,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=9e63715414bffb2a input=a9049054013a1b77]*/
/*[clinic end generated code: output=20946f5a2ed4492b input=a9049054013a1b77]*/
......@@ -208,15 +208,11 @@ static PyObject *
_io_FileIO_read_impl(fileio *self, Py_ssize_t size);
static PyObject *
_io_FileIO_read(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_FileIO_read(fileio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -284,16 +280,12 @@ static PyObject *
_io_FileIO_seek_impl(fileio *self, PyObject *pos, int whence);
static PyObject *
_io_FileIO_seek(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_FileIO_seek(fileio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *pos;
int whence = 0;
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O|i:seek",
&pos, &whence)) {
goto exit;
......@@ -342,15 +334,11 @@ static PyObject *
_io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
static PyObject *
_io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *posobj = NULL;
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "truncate",
0, 1,
&posobj)) {
......@@ -385,4 +373,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
#define _IO_FILEIO_TRUNCATE_METHODDEF
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
/*[clinic end generated code: output=2c6a5470100a8f10 input=a9049054013a1b77]*/
/*[clinic end generated code: output=1af8b4031633b763 input=a9049054013a1b77]*/
......@@ -180,15 +180,11 @@ static PyObject *
_io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit);
static PyObject *
_io__IOBase_readline(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__IOBase_readline(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t limit = -1;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:readline",
_Py_convert_optional_to_ssize_t, &limit)) {
goto exit;
......@@ -216,15 +212,11 @@ static PyObject *
_io__IOBase_readlines_impl(PyObject *self, Py_ssize_t hint);
static PyObject *
_io__IOBase_readlines(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__IOBase_readlines(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t hint = -1;
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:readlines",
_Py_convert_optional_to_ssize_t, &hint)) {
goto exit;
......@@ -255,15 +247,11 @@ static PyObject *
_io__RawIOBase_read_impl(PyObject *self, Py_ssize_t n);
static PyObject *
_io__RawIOBase_read(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__RawIOBase_read(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:read",
&n)) {
goto exit;
......@@ -291,4 +279,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return _io__RawIOBase_readall_impl(self);
}
/*[clinic end generated code: output=8361ae8d81d072bf input=a9049054013a1b77]*/
/*[clinic end generated code: output=1dc5cc1a9977d73f input=a9049054013a1b77]*/
......@@ -54,15 +54,11 @@ static PyObject *
_io_StringIO_read_impl(stringio *self, Py_ssize_t size);
static PyObject *
_io_StringIO_read(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_StringIO_read(stringio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -88,15 +84,11 @@ static PyObject *
_io_StringIO_readline_impl(stringio *self, Py_ssize_t size);
static PyObject *
_io_StringIO_readline(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_StringIO_readline(stringio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:readline",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -124,15 +116,11 @@ static PyObject *
_io_StringIO_truncate_impl(stringio *self, Py_ssize_t size);
static PyObject *
_io_StringIO_truncate(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_StringIO_truncate(stringio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = self->pos;
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:truncate",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -162,16 +150,12 @@ static PyObject *
_io_StringIO_seek_impl(stringio *self, Py_ssize_t pos, int whence);
static PyObject *
_io_StringIO_seek(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_StringIO_seek(stringio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t pos;
int whence = 0;
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "n|i:seek",
&pos, &whence)) {
goto exit;
......@@ -302,4 +286,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
{
return _io_StringIO_seekable_impl(self);
}
/*[clinic end generated code: output=443f5dd99bbbd053 input=a9049054013a1b77]*/
/*[clinic end generated code: output=a5e963d90b4eedc0 input=a9049054013a1b77]*/
......@@ -46,7 +46,7 @@ PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__,
"\n");
#define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF \
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL, _io_IncrementalNewlineDecoder_decode__doc__},
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
static PyObject *
_io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
......@@ -185,7 +185,7 @@ PyDoc_STRVAR(_io_TextIOWrapper_reconfigure__doc__,
"This also does an implicit stream flush.");
#define _IO_TEXTIOWRAPPER_RECONFIGURE_METHODDEF \
{"reconfigure", (PyCFunction)_io_TextIOWrapper_reconfigure, METH_FASTCALL, _io_TextIOWrapper_reconfigure__doc__},
{"reconfigure", (PyCFunction)_io_TextIOWrapper_reconfigure, METH_FASTCALL|METH_KEYWORDS, _io_TextIOWrapper_reconfigure__doc__},
static PyObject *
_io_TextIOWrapper_reconfigure_impl(textio *self,
......@@ -266,15 +266,11 @@ static PyObject *
_io_TextIOWrapper_read_impl(textio *self, Py_ssize_t n);
static PyObject *
_io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_TextIOWrapper_read(textio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t n = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &n)) {
goto exit;
......@@ -297,15 +293,11 @@ static PyObject *
_io_TextIOWrapper_readline_impl(textio *self, Py_ssize_t size);
static PyObject *
_io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_TextIOWrapper_readline(textio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:readline",
&size)) {
goto exit;
......@@ -328,16 +320,12 @@ static PyObject *
_io_TextIOWrapper_seek_impl(textio *self, PyObject *cookieObj, int whence);
static PyObject *
_io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_TextIOWrapper_seek(textio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *cookieObj;
int whence = 0;
if (!_PyArg_NoStackKeywords("seek", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O|i:seek",
&cookieObj, &whence)) {
goto exit;
......@@ -377,15 +365,11 @@ static PyObject *
_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
static PyObject *
_io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *pos = Py_None;
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "truncate",
0, 1,
&pos)) {
......@@ -515,4 +499,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
{
return _io_TextIOWrapper_close_impl(self);
}
/*[clinic end generated code: output=8ffc6d2557c9c620 input=a9049054013a1b77]*/
/*[clinic end generated code: output=937989df0a8abfc3 input=a9049054013a1b77]*/
......@@ -215,15 +215,11 @@ static PyObject *
_io__WindowsConsoleIO_read_impl(winconsoleio *self, Py_ssize_t size);
static PyObject *
_io__WindowsConsoleIO_read(winconsoleio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_io__WindowsConsoleIO_read(winconsoleio *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t size = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:read",
_Py_convert_optional_to_ssize_t, &size)) {
goto exit;
......@@ -332,4 +328,4 @@ _io__WindowsConsoleIO_isatty(winconsoleio *self, PyObject *Py_UNUSED(ignored))
#ifndef _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF
#define _IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF
#endif /* !defined(_IO__WINDOWSCONSOLEIO_ISATTY_METHODDEF) */
/*[clinic end generated code: output=3bbf6f893a58f476 input=a9049054013a1b77]*/
/*[clinic end generated code: output=7f74992fcd5bd89d input=a9049054013a1b77]*/
......@@ -99,7 +99,7 @@ PyDoc_STRVAR(_sha3_shake_128_digest__doc__,
"Return the digest value as a string of binary data.");
#define _SHA3_SHAKE_128_DIGEST_METHODDEF \
{"digest", (PyCFunction)_sha3_shake_128_digest, METH_FASTCALL, _sha3_shake_128_digest__doc__},
{"digest", (PyCFunction)_sha3_shake_128_digest, METH_FASTCALL|METH_KEYWORDS, _sha3_shake_128_digest__doc__},
static PyObject *
_sha3_shake_128_digest_impl(SHA3object *self, unsigned long length);
......@@ -129,7 +129,7 @@ PyDoc_STRVAR(_sha3_shake_128_hexdigest__doc__,
"Return the digest value as a string of hexadecimal digits.");
#define _SHA3_SHAKE_128_HEXDIGEST_METHODDEF \
{"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_FASTCALL, _sha3_shake_128_hexdigest__doc__},
{"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_FASTCALL|METH_KEYWORDS, _sha3_shake_128_hexdigest__doc__},
static PyObject *
_sha3_shake_128_hexdigest_impl(SHA3object *self, unsigned long length);
......@@ -151,4 +151,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject **args, Py_ssize_t nargs, P
exit:
return return_value;
}
/*[clinic end generated code: output=f2278bf0852a7850 input=a9049054013a1b77]*/
/*[clinic end generated code: output=7c1ac102411764f2 input=a9049054013a1b77]*/
......@@ -1817,15 +1817,12 @@ to the format string S.format. See help(struct) for more on format\n\
strings.");
static PyObject *
s_pack(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
s_pack(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyStructObject *soself;
PyObject *result;
/* Validate arguments. */
if (!_PyArg_NoStackKeywords("pack", kwnames)) {
return NULL;
}
soself = (PyStructObject *)self;
assert(PyStruct_Check(self));
assert(soself->s_codes != NULL);
......@@ -1859,16 +1856,13 @@ offset. Note that the offset is a required argument. See\n\
help(struct) for more on format strings.");
static PyObject *
s_pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
s_pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyStructObject *soself;
Py_buffer buffer;
Py_ssize_t offset;
/* Validate arguments. +1 is for the first arg as buffer. */
if (!_PyArg_NoStackKeywords("pack_into", kwnames)) {
return NULL;
}
soself = (PyStructObject *)self;
assert(PyStruct_Check(self));
assert(soself->s_codes != NULL);
......@@ -2126,15 +2120,11 @@ Return a bytes object containing the values v1, v2, ... packed according\n\
to the format string. See help(struct) for more on format strings.");
static PyObject *
pack(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
pack(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *s_object = NULL;
PyObject *format, *result;
if (!_PyArg_NoStackKeywords("pack", kwnames)) {
return NULL;
}
if (nargs == 0) {
PyErr_SetString(PyExc_TypeError, "missing format argument");
return NULL;
......@@ -2144,7 +2134,7 @@ pack(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
if (!cache_struct_converter(format, &s_object)) {
return NULL;
}
result = s_pack(s_object, args + 1, nargs - 1, kwnames);
result = s_pack(s_object, args + 1, nargs - 1);
Py_DECREF(s_object);
return result;
}
......@@ -2158,15 +2148,11 @@ that the offset is a required argument. See help(struct) for more\n\
on format strings.");
static PyObject *
pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *s_object = NULL;
PyObject *format, *result;
if (!_PyArg_NoStackKeywords("pack_into", kwnames)) {
return NULL;
}
if (nargs == 0) {
PyErr_SetString(PyExc_TypeError, "missing format argument");
return NULL;
......@@ -2176,7 +2162,7 @@ pack_into(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
if (!cache_struct_converter(format, &s_object)) {
return NULL;
}
result = s_pack_into(s_object, args + 1, nargs - 1, kwnames);
result = s_pack_into(s_object, args + 1, nargs - 1);
Py_DECREF(s_object);
return result;
}
......
......@@ -14,7 +14,7 @@ PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__,
"registered with codecs.register_error that can handle UnicodeEncodeErrors.");
#define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
{"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_FASTCALL, _multibytecodec_MultibyteCodec_encode__doc__},
{"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
static PyObject *
_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
......@@ -52,7 +52,7 @@ PyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__,
"codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
#define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
{"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_FASTCALL, _multibytecodec_MultibyteCodec_decode__doc__},
{"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteCodec_decode__doc__},
static PyObject *
_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
......@@ -89,7 +89,7 @@ PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__,
"\n");
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF \
{"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
{"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
static PyObject *
_multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
......@@ -138,7 +138,7 @@ PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__,
"\n");
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF \
{"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
{"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_FASTCALL|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
static PyObject *
_multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
......@@ -199,15 +199,11 @@ _multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *sel
PyObject *sizeobj);
static PyObject *
_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *sizeobj = Py_None;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "read",
0, 1,
&sizeobj)) {
......@@ -232,15 +228,11 @@ _multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject
PyObject *sizeobj);
static PyObject *
_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *sizeobj = Py_None;
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "readline",
0, 1,
&sizeobj)) {
......@@ -265,15 +257,11 @@ _multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject
PyObject *sizehintobj);
static PyObject *
_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *sizehintobj = Py_None;
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "readlines",
0, 1,
&sizehintobj)) {
......@@ -342,4 +330,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
/*[clinic end generated code: output=12192026a9d55d48 input=a9049054013a1b77]*/
/*[clinic end generated code: output=dc2352619de9d74f input=a9049054013a1b77]*/
......@@ -267,7 +267,7 @@ PyDoc_STRVAR(_asyncio_Task_current_task__doc__,
"None is returned when called not in the context of a Task.");
#define _ASYNCIO_TASK_CURRENT_TASK_METHODDEF \
{"current_task", (PyCFunction)_asyncio_Task_current_task, METH_FASTCALL|METH_CLASS, _asyncio_Task_current_task__doc__},
{"current_task", (PyCFunction)_asyncio_Task_current_task, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, _asyncio_Task_current_task__doc__},
static PyObject *
_asyncio_Task_current_task_impl(PyTypeObject *type, PyObject *loop);
......@@ -299,7 +299,7 @@ PyDoc_STRVAR(_asyncio_Task_all_tasks__doc__,
"By default all tasks for the current event loop are returned.");
#define _ASYNCIO_TASK_ALL_TASKS_METHODDEF \
{"all_tasks", (PyCFunction)_asyncio_Task_all_tasks, METH_FASTCALL|METH_CLASS, _asyncio_Task_all_tasks__doc__},
{"all_tasks", (PyCFunction)_asyncio_Task_all_tasks, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, _asyncio_Task_all_tasks__doc__},
static PyObject *
_asyncio_Task_all_tasks_impl(PyTypeObject *type, PyObject *loop);
......@@ -399,7 +399,7 @@ PyDoc_STRVAR(_asyncio_Task_get_stack__doc__,
"returned for a suspended coroutine.");
#define _ASYNCIO_TASK_GET_STACK_METHODDEF \
{"get_stack", (PyCFunction)_asyncio_Task_get_stack, METH_FASTCALL, _asyncio_Task_get_stack__doc__},
{"get_stack", (PyCFunction)_asyncio_Task_get_stack, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task_get_stack__doc__},
static PyObject *
_asyncio_Task_get_stack_impl(TaskObj *self, PyObject *limit);
......@@ -435,7 +435,7 @@ PyDoc_STRVAR(_asyncio_Task_print_stack__doc__,
"to sys.stderr.");
#define _ASYNCIO_TASK_PRINT_STACK_METHODDEF \
{"print_stack", (PyCFunction)_asyncio_Task_print_stack, METH_FASTCALL, _asyncio_Task_print_stack__doc__},
{"print_stack", (PyCFunction)_asyncio_Task_print_stack, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task_print_stack__doc__},
static PyObject *
_asyncio_Task_print_stack_impl(TaskObj *self, PyObject *limit,
......@@ -466,7 +466,7 @@ PyDoc_STRVAR(_asyncio_Task__step__doc__,
"\n");
#define _ASYNCIO_TASK__STEP_METHODDEF \
{"_step", (PyCFunction)_asyncio_Task__step, METH_FASTCALL, _asyncio_Task__step__doc__},
{"_step", (PyCFunction)_asyncio_Task__step, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task__step__doc__},
static PyObject *
_asyncio_Task__step_impl(TaskObj *self, PyObject *exc);
......@@ -495,7 +495,7 @@ PyDoc_STRVAR(_asyncio_Task__wakeup__doc__,
"\n");
#define _ASYNCIO_TASK__WAKEUP_METHODDEF \
{"_wakeup", (PyCFunction)_asyncio_Task__wakeup, METH_FASTCALL, _asyncio_Task__wakeup__doc__},
{"_wakeup", (PyCFunction)_asyncio_Task__wakeup, METH_FASTCALL|METH_KEYWORDS, _asyncio_Task__wakeup__doc__},
static PyObject *
_asyncio_Task__wakeup_impl(TaskObj *self, PyObject *fut);
......@@ -517,4 +517,4 @@ _asyncio_Task__wakeup(TaskObj *self, PyObject **args, Py_ssize_t nargs, PyObject
exit:
return return_value;
}
/*[clinic end generated code: output=3dfec49689cebd4c input=a9049054013a1b77]*/
/*[clinic end generated code: output=fe651840e0466fa9 input=a9049054013a1b77]*/
......@@ -115,7 +115,7 @@ PyDoc_STRVAR(_bz2_BZ2Decompressor_decompress__doc__,
"the unused_data attribute.");
#define _BZ2_BZ2DECOMPRESSOR_DECOMPRESS_METHODDEF \
{"decompress", (PyCFunction)_bz2_BZ2Decompressor_decompress, METH_FASTCALL, _bz2_BZ2Decompressor_decompress__doc__},
{"decompress", (PyCFunction)_bz2_BZ2Decompressor_decompress, METH_FASTCALL|METH_KEYWORDS, _bz2_BZ2Decompressor_decompress__doc__},
static PyObject *
_bz2_BZ2Decompressor_decompress_impl(BZ2Decompressor *self, Py_buffer *data,
......@@ -174,4 +174,4 @@ _bz2_BZ2Decompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
/*[clinic end generated code: output=0e97a1d716b35a14 input=a9049054013a1b77]*/
/*[clinic end generated code: output=835673574cf12cc4 input=a9049054013a1b77]*/
This diff is collapsed.
......@@ -20,16 +20,12 @@ static PyObject *
crypt_crypt_impl(PyObject *module, const char *word, const char *salt);
static PyObject *
crypt_crypt(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
crypt_crypt(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *word;
const char *salt;
if (!_PyArg_NoStackKeywords("crypt", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "ss:crypt",
&word, &salt)) {
goto exit;
......@@ -39,4 +35,4 @@ crypt_crypt(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
exit:
return return_value;
}
/*[clinic end generated code: output=ebdc6b6a5dec4539 input=a9049054013a1b77]*/
/*[clinic end generated code: output=f5a6aff28d43154f input=a9049054013a1b77]*/
......@@ -14,7 +14,7 @@ PyDoc_STRVAR(datetime_datetime_now__doc__,
"If no tz is specified, uses local timezone.");
#define DATETIME_DATETIME_NOW_METHODDEF \
{"now", (PyCFunction)datetime_datetime_now, METH_FASTCALL|METH_CLASS, datetime_datetime_now__doc__},
{"now", (PyCFunction)datetime_datetime_now, METH_FASTCALL|METH_KEYWORDS|METH_CLASS, datetime_datetime_now__doc__},
static PyObject *
datetime_datetime_now_impl(PyTypeObject *type, PyObject *tz);
......@@ -36,4 +36,4 @@ datetime_datetime_now(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyO
exit:
return return_value;
}
/*[clinic end generated code: output=ff78f2f51687e9a9 input=a9049054013a1b77]*/
/*[clinic end generated code: output=93cb014e47dae4b3 input=a9049054013a1b77]*/
......@@ -52,17 +52,13 @@ _dbm_dbm_get_impl(dbmobject *self, const char *key,
Py_ssize_clean_t key_length, PyObject *default_value);
static PyObject *
_dbm_dbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_dbm_dbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *key;
Py_ssize_clean_t key_length;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("get", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "s#|O:get",
&key, &key_length, &default_value)) {
goto exit;
......@@ -90,17 +86,13 @@ _dbm_dbm_setdefault_impl(dbmobject *self, const char *key,
PyObject *default_value);
static PyObject *
_dbm_dbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_dbm_dbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *key;
Py_ssize_clean_t key_length;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("setdefault", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "s#|O:setdefault",
&key, &key_length, &default_value)) {
goto exit;
......@@ -133,17 +125,13 @@ dbmopen_impl(PyObject *module, const char *filename, const char *flags,
int mode);
static PyObject *
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *filename;
const char *flags = "r";
int mode = 438;
if (!_PyArg_NoStackKeywords("open", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "s|si:open",
&filename, &flags, &mode)) {
goto exit;
......@@ -153,4 +141,4 @@ dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
exit:
return return_value;
}
/*[clinic end generated code: output=35a8df9a8e4ed18f input=a9049054013a1b77]*/
/*[clinic end generated code: output=627d28ce1f3188dc input=a9049054013a1b77]*/
......@@ -136,7 +136,7 @@ PyDoc_STRVAR(_elementtree_Element_find__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_FIND_METHODDEF \
{"find", (PyCFunction)_elementtree_Element_find, METH_FASTCALL, _elementtree_Element_find__doc__},
{"find", (PyCFunction)_elementtree_Element_find, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_find__doc__},
static PyObject *
_elementtree_Element_find_impl(ElementObject *self, PyObject *path,
......@@ -167,7 +167,7 @@ PyDoc_STRVAR(_elementtree_Element_findtext__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_FINDTEXT_METHODDEF \
{"findtext", (PyCFunction)_elementtree_Element_findtext, METH_FASTCALL, _elementtree_Element_findtext__doc__},
{"findtext", (PyCFunction)_elementtree_Element_findtext, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_findtext__doc__},
static PyObject *
_elementtree_Element_findtext_impl(ElementObject *self, PyObject *path,
......@@ -200,7 +200,7 @@ PyDoc_STRVAR(_elementtree_Element_findall__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_FINDALL_METHODDEF \
{"findall", (PyCFunction)_elementtree_Element_findall, METH_FASTCALL, _elementtree_Element_findall__doc__},
{"findall", (PyCFunction)_elementtree_Element_findall, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_findall__doc__},
static PyObject *
_elementtree_Element_findall_impl(ElementObject *self, PyObject *path,
......@@ -231,7 +231,7 @@ PyDoc_STRVAR(_elementtree_Element_iterfind__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_ITERFIND_METHODDEF \
{"iterfind", (PyCFunction)_elementtree_Element_iterfind, METH_FASTCALL, _elementtree_Element_iterfind__doc__},
{"iterfind", (PyCFunction)_elementtree_Element_iterfind, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_iterfind__doc__},
static PyObject *
_elementtree_Element_iterfind_impl(ElementObject *self, PyObject *path,
......@@ -262,7 +262,7 @@ PyDoc_STRVAR(_elementtree_Element_get__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_GET_METHODDEF \
{"get", (PyCFunction)_elementtree_Element_get, METH_FASTCALL, _elementtree_Element_get__doc__},
{"get", (PyCFunction)_elementtree_Element_get, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_get__doc__},
static PyObject *
_elementtree_Element_get_impl(ElementObject *self, PyObject *key,
......@@ -310,7 +310,7 @@ PyDoc_STRVAR(_elementtree_Element_iter__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_ITER_METHODDEF \
{"iter", (PyCFunction)_elementtree_Element_iter, METH_FASTCALL, _elementtree_Element_iter__doc__},
{"iter", (PyCFunction)_elementtree_Element_iter, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_iter__doc__},
static PyObject *
_elementtree_Element_iter_impl(ElementObject *self, PyObject *tag);
......@@ -339,7 +339,7 @@ PyDoc_STRVAR(_elementtree_Element_getiterator__doc__,
"\n");
#define _ELEMENTTREE_ELEMENT_GETITERATOR_METHODDEF \
{"getiterator", (PyCFunction)_elementtree_Element_getiterator, METH_FASTCALL, _elementtree_Element_getiterator__doc__},
{"getiterator", (PyCFunction)_elementtree_Element_getiterator, METH_FASTCALL|METH_KEYWORDS, _elementtree_Element_getiterator__doc__},
static PyObject *
_elementtree_Element_getiterator_impl(ElementObject *self, PyObject *tag);
......@@ -392,16 +392,12 @@ _elementtree_Element_insert_impl(ElementObject *self, Py_ssize_t index,
PyObject *subelement);
static PyObject *
_elementtree_Element_insert(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_Element_insert(ElementObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t index;
PyObject *subelement;
if (!_PyArg_NoStackKeywords("insert", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "nO!:insert",
&index, &Element_Type, &subelement)) {
goto exit;
......@@ -459,16 +455,12 @@ _elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
PyObject *attrib);
static PyObject *
_elementtree_Element_makeelement(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_Element_makeelement(ElementObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *tag;
PyObject *attrib;
if (!_PyArg_NoStackKeywords("makeelement", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "makeelement",
2, 2,
&tag, &attrib)) {
......@@ -519,16 +511,12 @@ _elementtree_Element_set_impl(ElementObject *self, PyObject *key,
PyObject *value);
static PyObject *
_elementtree_Element_set(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_Element_set(ElementObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *value;
if (!_PyArg_NoStackKeywords("set", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "set",
2, 2,
&key, &value)) {
......@@ -608,16 +596,12 @@ _elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
PyObject *attrs);
static PyObject *
_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *tag;
PyObject *attrs = Py_None;
if (!_PyArg_NoStackKeywords("start", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "start",
1, 2,
&tag, &attrs)) {
......@@ -699,17 +683,13 @@ _elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
PyObject *pubid, PyObject *system);
static PyObject *
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *name;
PyObject *pubid;
PyObject *system;
if (!_PyArg_NoStackKeywords("doctype", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "doctype",
3, 3,
&name, &pubid, &system)) {
......@@ -735,16 +715,12 @@ _elementtree_XMLParser__setevents_impl(XMLParserObject *self,
PyObject *events_to_report);
static PyObject *
_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *events_queue;
PyObject *events_to_report = Py_None;
if (!_PyArg_NoStackKeywords("_setevents", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "_setevents",
1, 2,
&events_queue, &events_to_report)) {
......@@ -755,4 +731,4 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject **args, Py_ssi
exit:
return return_value;
}
/*[clinic end generated code: output=6606b1018d2562e1 input=a9049054013a1b77]*/
/*[clinic end generated code: output=75d0ff80e20b830f input=a9049054013a1b77]*/
......@@ -15,16 +15,12 @@ static PyObject *
_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value);
static PyObject *
_gdbm_gdbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_gdbm_gdbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *default_value = Py_None;
if (!_PyArg_NoStackKeywords("get", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "get",
1, 2,
&key, &default_value)) {
......@@ -50,16 +46,12 @@ _gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
PyObject *default_value);
static PyObject *
_gdbm_gdbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_gdbm_gdbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *key;
PyObject *default_value = Py_None;
if (!_PyArg_NoStackKeywords("setdefault", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "setdefault",
1, 2,
&key, &default_value)) {
......@@ -245,17 +237,13 @@ static PyObject *
dbmopen_impl(PyObject *module, const char *name, const char *flags, int mode);
static PyObject *
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *name;
const char *flags = "r";
int mode = 438;
if (!_PyArg_NoStackKeywords("open", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "s|si:open",
&name, &flags, &mode)) {
goto exit;
......@@ -265,4 +253,4 @@ dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
exit:
return return_value;
}
/*[clinic end generated code: output=94c5713a85dab560 input=a9049054013a1b77]*/
/*[clinic end generated code: output=9c72502b30bb7485 input=a9049054013a1b77]*/
......@@ -12,7 +12,7 @@ PyDoc_STRVAR(_hashlib_scrypt__doc__,
"scrypt password-based key derivation function.");
#define _HASHLIB_SCRYPT_METHODDEF \
{"scrypt", (PyCFunction)_hashlib_scrypt, METH_FASTCALL, _hashlib_scrypt__doc__},
{"scrypt", (PyCFunction)_hashlib_scrypt, METH_FASTCALL|METH_KEYWORDS, _hashlib_scrypt__doc__},
static PyObject *
_hashlib_scrypt_impl(PyObject *module, Py_buffer *password, Py_buffer *salt,
......@@ -57,4 +57,4 @@ exit:
#ifndef _HASHLIB_SCRYPT_METHODDEF
#define _HASHLIB_SCRYPT_METHODDEF
#endif /* !defined(_HASHLIB_SCRYPT_METHODDEF) */
/*[clinic end generated code: output=71f1e033efe4ac9a input=a9049054013a1b77]*/
/*[clinic end generated code: output=eda2a998d5b29030 input=a9049054013a1b77]*/
......@@ -81,7 +81,7 @@ PyDoc_STRVAR(_lzma_LZMADecompressor_decompress__doc__,
"the unused_data attribute.");
#define _LZMA_LZMADECOMPRESSOR_DECOMPRESS_METHODDEF \
{"decompress", (PyCFunction)_lzma_LZMADecompressor_decompress, METH_FASTCALL, _lzma_LZMADecompressor_decompress__doc__},
{"decompress", (PyCFunction)_lzma_LZMADecompressor_decompress, METH_FASTCALL|METH_KEYWORDS, _lzma_LZMADecompressor_decompress__doc__},
static PyObject *
_lzma_LZMADecompressor_decompress_impl(Decompressor *self, Py_buffer *data,
......@@ -236,16 +236,12 @@ _lzma__decode_filter_properties_impl(PyObject *module, lzma_vli filter_id,
Py_buffer *encoded_props);
static PyObject *
_lzma__decode_filter_properties(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_lzma__decode_filter_properties(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
lzma_vli filter_id;
Py_buffer encoded_props = {NULL, NULL};
if (!_PyArg_NoStackKeywords("_decode_filter_properties", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&y*:_decode_filter_properties",
lzma_vli_converter, &filter_id, &encoded_props)) {
goto exit;
......@@ -260,4 +256,4 @@ exit:
return return_value;
}
/*[clinic end generated code: output=473cf89eb501c28b input=a9049054013a1b77]*/
/*[clinic end generated code: output=d4e3802d0dea9af3 input=a9049054013a1b77]*/
......@@ -15,17 +15,13 @@ static int
_opcode_stack_effect_impl(PyObject *module, int opcode, PyObject *oparg);
static PyObject *
_opcode_stack_effect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_opcode_stack_effect(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int opcode;
PyObject *oparg = Py_None;
int _return_value;
if (!_PyArg_NoStackKeywords("stack_effect", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "i|O:stack_effect",
&opcode, &oparg)) {
goto exit;
......@@ -39,4 +35,4 @@ _opcode_stack_effect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObje
exit:
return return_value;
}
/*[clinic end generated code: output=38f3bf305b3bb601 input=a9049054013a1b77]*/
/*[clinic end generated code: output=616105b05b55eb45 input=a9049054013a1b77]*/
This diff is collapsed.
......@@ -207,16 +207,12 @@ _pickle_Unpickler_find_class_impl(UnpicklerObject *self,
PyObject *global_name);
static PyObject *
_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *module_name;
PyObject *global_name;
if (!_PyArg_NoStackKeywords("find_class", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "find_class",
2, 2,
&module_name, &global_name)) {
......@@ -388,7 +384,7 @@ PyDoc_STRVAR(_pickle_dump__doc__,
"2, so that the pickle data stream is readable with Python 2.");
#define _PICKLE_DUMP_METHODDEF \
{"dump", (PyCFunction)_pickle_dump, METH_FASTCALL, _pickle_dump__doc__},
{"dump", (PyCFunction)_pickle_dump, METH_FASTCALL|METH_KEYWORDS, _pickle_dump__doc__},
static PyObject *
_pickle_dump_impl(PyObject *module, PyObject *obj, PyObject *file,
......@@ -434,7 +430,7 @@ PyDoc_STRVAR(_pickle_dumps__doc__,
"Python 2, so that the pickle data stream is readable with Python 2.");
#define _PICKLE_DUMPS_METHODDEF \
{"dumps", (PyCFunction)_pickle_dumps, METH_FASTCALL, _pickle_dumps__doc__},
{"dumps", (PyCFunction)_pickle_dumps, METH_FASTCALL|METH_KEYWORDS, _pickle_dumps__doc__},
static PyObject *
_pickle_dumps_impl(PyObject *module, PyObject *obj, PyObject *protocol,
......@@ -490,7 +486,7 @@ PyDoc_STRVAR(_pickle_load__doc__,
"string instances as bytes objects.");
#define _PICKLE_LOAD_METHODDEF \
{"load", (PyCFunction)_pickle_load, METH_FASTCALL, _pickle_load__doc__},
{"load", (PyCFunction)_pickle_load, METH_FASTCALL|METH_KEYWORDS, _pickle_load__doc__},
static PyObject *
_pickle_load_impl(PyObject *module, PyObject *file, int fix_imports,
......@@ -538,7 +534,7 @@ PyDoc_STRVAR(_pickle_loads__doc__,
"string instances as bytes objects.");
#define _PICKLE_LOADS_METHODDEF \
{"loads", (PyCFunction)_pickle_loads, METH_FASTCALL, _pickle_loads__doc__},
{"loads", (PyCFunction)_pickle_loads, METH_FASTCALL|METH_KEYWORDS, _pickle_loads__doc__},
static PyObject *
_pickle_loads_impl(PyObject *module, PyObject *data, int fix_imports,
......@@ -564,4 +560,4 @@ _pickle_loads(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
exit:
return return_value;
}
/*[clinic end generated code: output=639dd0eb8de16c3c input=a9049054013a1b77]*/
/*[clinic end generated code: output=a6243aaa6ea98732 input=a9049054013a1b77]*/
......@@ -160,7 +160,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_match__doc__,
"Matches zero or more characters at the beginning of the string.");
#define _SRE_SRE_PATTERN_MATCH_METHODDEF \
{"match", (PyCFunction)_sre_SRE_Pattern_match, METH_FASTCALL, _sre_SRE_Pattern_match__doc__},
{"match", (PyCFunction)_sre_SRE_Pattern_match, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_match__doc__},
static PyObject *
_sre_SRE_Pattern_match_impl(PatternObject *self, PyObject *string,
......@@ -193,7 +193,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_fullmatch__doc__,
"Matches against all of the string");
#define _SRE_SRE_PATTERN_FULLMATCH_METHODDEF \
{"fullmatch", (PyCFunction)_sre_SRE_Pattern_fullmatch, METH_FASTCALL, _sre_SRE_Pattern_fullmatch__doc__},
{"fullmatch", (PyCFunction)_sre_SRE_Pattern_fullmatch, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_fullmatch__doc__},
static PyObject *
_sre_SRE_Pattern_fullmatch_impl(PatternObject *self, PyObject *string,
......@@ -228,7 +228,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_search__doc__,
"Return None if no position in the string matches.");
#define _SRE_SRE_PATTERN_SEARCH_METHODDEF \
{"search", (PyCFunction)_sre_SRE_Pattern_search, METH_FASTCALL, _sre_SRE_Pattern_search__doc__},
{"search", (PyCFunction)_sre_SRE_Pattern_search, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_search__doc__},
static PyObject *
_sre_SRE_Pattern_search_impl(PatternObject *self, PyObject *string,
......@@ -261,7 +261,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_findall__doc__,
"Return a list of all non-overlapping matches of pattern in string.");
#define _SRE_SRE_PATTERN_FINDALL_METHODDEF \
{"findall", (PyCFunction)_sre_SRE_Pattern_findall, METH_FASTCALL, _sre_SRE_Pattern_findall__doc__},
{"findall", (PyCFunction)_sre_SRE_Pattern_findall, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_findall__doc__},
static PyObject *
_sre_SRE_Pattern_findall_impl(PatternObject *self, PyObject *string,
......@@ -296,7 +296,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_finditer__doc__,
"For each match, the iterator returns a match object.");
#define _SRE_SRE_PATTERN_FINDITER_METHODDEF \
{"finditer", (PyCFunction)_sre_SRE_Pattern_finditer, METH_FASTCALL, _sre_SRE_Pattern_finditer__doc__},
{"finditer", (PyCFunction)_sre_SRE_Pattern_finditer, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_finditer__doc__},
static PyObject *
_sre_SRE_Pattern_finditer_impl(PatternObject *self, PyObject *string,
......@@ -328,7 +328,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_scanner__doc__,
"\n");
#define _SRE_SRE_PATTERN_SCANNER_METHODDEF \
{"scanner", (PyCFunction)_sre_SRE_Pattern_scanner, METH_FASTCALL, _sre_SRE_Pattern_scanner__doc__},
{"scanner", (PyCFunction)_sre_SRE_Pattern_scanner, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_scanner__doc__},
static PyObject *
_sre_SRE_Pattern_scanner_impl(PatternObject *self, PyObject *string,
......@@ -361,7 +361,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_split__doc__,
"Split string by the occurrences of pattern.");
#define _SRE_SRE_PATTERN_SPLIT_METHODDEF \
{"split", (PyCFunction)_sre_SRE_Pattern_split, METH_FASTCALL, _sre_SRE_Pattern_split__doc__},
{"split", (PyCFunction)_sre_SRE_Pattern_split, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_split__doc__},
static PyObject *
_sre_SRE_Pattern_split_impl(PatternObject *self, PyObject *string,
......@@ -393,7 +393,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_sub__doc__,
"Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl.");
#define _SRE_SRE_PATTERN_SUB_METHODDEF \
{"sub", (PyCFunction)_sre_SRE_Pattern_sub, METH_FASTCALL, _sre_SRE_Pattern_sub__doc__},
{"sub", (PyCFunction)_sre_SRE_Pattern_sub, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_sub__doc__},
static PyObject *
_sre_SRE_Pattern_sub_impl(PatternObject *self, PyObject *repl,
......@@ -426,7 +426,7 @@ PyDoc_STRVAR(_sre_SRE_Pattern_subn__doc__,
"Return the tuple (new_string, number_of_subs_made) found by replacing the leftmost non-overlapping occurrences of pattern with the replacement repl.");
#define _SRE_SRE_PATTERN_SUBN_METHODDEF \
{"subn", (PyCFunction)_sre_SRE_Pattern_subn, METH_FASTCALL, _sre_SRE_Pattern_subn__doc__},
{"subn", (PyCFunction)_sre_SRE_Pattern_subn, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Pattern_subn__doc__},
static PyObject *
_sre_SRE_Pattern_subn_impl(PatternObject *self, PyObject *repl,
......@@ -484,7 +484,7 @@ PyDoc_STRVAR(_sre_compile__doc__,
"\n");
#define _SRE_COMPILE_METHODDEF \
{"compile", (PyCFunction)_sre_compile, METH_FASTCALL, _sre_compile__doc__},
{"compile", (PyCFunction)_sre_compile, METH_FASTCALL|METH_KEYWORDS, _sre_compile__doc__},
static PyObject *
_sre_compile_impl(PyObject *module, PyObject *pattern, int flags,
......@@ -521,7 +521,7 @@ PyDoc_STRVAR(_sre_SRE_Match_expand__doc__,
"Return the string obtained by doing backslash substitution on the string template, as done by the sub() method.");
#define _SRE_SRE_MATCH_EXPAND_METHODDEF \
{"expand", (PyCFunction)_sre_SRE_Match_expand, METH_FASTCALL, _sre_SRE_Match_expand__doc__},
{"expand", (PyCFunction)_sre_SRE_Match_expand, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_expand__doc__},
static PyObject *
_sre_SRE_Match_expand_impl(MatchObject *self, PyObject *template);
......@@ -554,7 +554,7 @@ PyDoc_STRVAR(_sre_SRE_Match_groups__doc__,
" Is used for groups that did not participate in the match.");
#define _SRE_SRE_MATCH_GROUPS_METHODDEF \
{"groups", (PyCFunction)_sre_SRE_Match_groups, METH_FASTCALL, _sre_SRE_Match_groups__doc__},
{"groups", (PyCFunction)_sre_SRE_Match_groups, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_groups__doc__},
static PyObject *
_sre_SRE_Match_groups_impl(MatchObject *self, PyObject *default_value);
......@@ -587,7 +587,7 @@ PyDoc_STRVAR(_sre_SRE_Match_groupdict__doc__,
" Is used for groups that did not participate in the match.");
#define _SRE_SRE_MATCH_GROUPDICT_METHODDEF \
{"groupdict", (PyCFunction)_sre_SRE_Match_groupdict, METH_FASTCALL, _sre_SRE_Match_groupdict__doc__},
{"groupdict", (PyCFunction)_sre_SRE_Match_groupdict, METH_FASTCALL|METH_KEYWORDS, _sre_SRE_Match_groupdict__doc__},
static PyObject *
_sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value);
......@@ -623,16 +623,12 @@ static Py_ssize_t
_sre_SRE_Match_start_impl(MatchObject *self, PyObject *group);
static PyObject *
_sre_SRE_Match_start(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_sre_SRE_Match_start(MatchObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *group = NULL;
Py_ssize_t _return_value;
if (!_PyArg_NoStackKeywords("start", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "start",
0, 1,
&group)) {
......@@ -661,16 +657,12 @@ static Py_ssize_t
_sre_SRE_Match_end_impl(MatchObject *self, PyObject *group);
static PyObject *
_sre_SRE_Match_end(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_sre_SRE_Match_end(MatchObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *group = NULL;
Py_ssize_t _return_value;
if (!_PyArg_NoStackKeywords("end", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "end",
0, 1,
&group)) {
......@@ -699,15 +691,11 @@ static PyObject *
_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group);
static PyObject *
_sre_SRE_Match_span(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_sre_SRE_Match_span(MatchObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *group = NULL;
if (!_PyArg_NoStackKeywords("span", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "span",
0, 1,
&group)) {
......@@ -777,4 +765,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
{
return _sre_SRE_Scanner_search_impl(self);
}
/*[clinic end generated code: output=28b0cc05da4ac219 input=a9049054013a1b77]*/
/*[clinic end generated code: output=6e3fb17fef1be436 input=a9049054013a1b77]*/
......@@ -66,15 +66,11 @@ static PyObject *
_ssl__SSLSocket_peer_certificate_impl(PySSLSocket *self, int binary_mode);
static PyObject *
_ssl__SSLSocket_peer_certificate(PySSLSocket *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_ssl__SSLSocket_peer_certificate(PySSLSocket *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int binary_mode = 0;
if (!_PyArg_NoStackKeywords("peer_certificate", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|p:peer_certificate",
&binary_mode)) {
goto exit;
......@@ -473,7 +469,7 @@ PyDoc_STRVAR(_ssl__SSLContext_load_cert_chain__doc__,
"\n");
#define _SSL__SSLCONTEXT_LOAD_CERT_CHAIN_METHODDEF \
{"load_cert_chain", (PyCFunction)_ssl__SSLContext_load_cert_chain, METH_FASTCALL, _ssl__SSLContext_load_cert_chain__doc__},
{"load_cert_chain", (PyCFunction)_ssl__SSLContext_load_cert_chain, METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext_load_cert_chain__doc__},
static PyObject *
_ssl__SSLContext_load_cert_chain_impl(PySSLContext *self, PyObject *certfile,
......@@ -505,7 +501,7 @@ PyDoc_STRVAR(_ssl__SSLContext_load_verify_locations__doc__,
"\n");
#define _SSL__SSLCONTEXT_LOAD_VERIFY_LOCATIONS_METHODDEF \
{"load_verify_locations", (PyCFunction)_ssl__SSLContext_load_verify_locations, METH_FASTCALL, _ssl__SSLContext_load_verify_locations__doc__},
{"load_verify_locations", (PyCFunction)_ssl__SSLContext_load_verify_locations, METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext_load_verify_locations__doc__},
static PyObject *
_ssl__SSLContext_load_verify_locations_impl(PySSLContext *self,
......@@ -547,7 +543,7 @@ PyDoc_STRVAR(_ssl__SSLContext__wrap_socket__doc__,
"\n");
#define _SSL__SSLCONTEXT__WRAP_SOCKET_METHODDEF \
{"_wrap_socket", (PyCFunction)_ssl__SSLContext__wrap_socket, METH_FASTCALL, _ssl__SSLContext__wrap_socket__doc__},
{"_wrap_socket", (PyCFunction)_ssl__SSLContext__wrap_socket, METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext__wrap_socket__doc__},
static PyObject *
_ssl__SSLContext__wrap_socket_impl(PySSLContext *self, PyObject *sock,
......@@ -580,7 +576,7 @@ PyDoc_STRVAR(_ssl__SSLContext__wrap_bio__doc__,
"\n");
#define _SSL__SSLCONTEXT__WRAP_BIO_METHODDEF \
{"_wrap_bio", (PyCFunction)_ssl__SSLContext__wrap_bio, METH_FASTCALL, _ssl__SSLContext__wrap_bio__doc__},
{"_wrap_bio", (PyCFunction)_ssl__SSLContext__wrap_bio, METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext__wrap_bio__doc__},
static PyObject *
_ssl__SSLContext__wrap_bio_impl(PySSLContext *self, PySSLMemoryBIO *incoming,
......@@ -704,7 +700,7 @@ PyDoc_STRVAR(_ssl__SSLContext_get_ca_certs__doc__,
"been used at least once.");
#define _SSL__SSLCONTEXT_GET_CA_CERTS_METHODDEF \
{"get_ca_certs", (PyCFunction)_ssl__SSLContext_get_ca_certs, METH_FASTCALL, _ssl__SSLContext_get_ca_certs__doc__},
{"get_ca_certs", (PyCFunction)_ssl__SSLContext_get_ca_certs, METH_FASTCALL|METH_KEYWORDS, _ssl__SSLContext_get_ca_certs__doc__},
static PyObject *
_ssl__SSLContext_get_ca_certs_impl(PySSLContext *self, int binary_form);
......@@ -767,15 +763,11 @@ static PyObject *
_ssl_MemoryBIO_read_impl(PySSLMemoryBIO *self, int len);
static PyObject *
_ssl_MemoryBIO_read(PySSLMemoryBIO *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_ssl_MemoryBIO_read(PySSLMemoryBIO *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int len = -1;
if (!_PyArg_NoStackKeywords("read", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|i:read",
&len)) {
goto exit;
......@@ -856,16 +848,12 @@ static PyObject *
_ssl_RAND_add_impl(PyObject *module, Py_buffer *view, double entropy);
static PyObject *
_ssl_RAND_add(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_ssl_RAND_add(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer view = {NULL, NULL};
double entropy;
if (!_PyArg_NoStackKeywords("RAND_add", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "s*d:RAND_add",
&view, &entropy)) {
goto exit;
......@@ -1023,7 +1011,7 @@ PyDoc_STRVAR(_ssl_txt2obj__doc__,
"long name are also matched.");
#define _SSL_TXT2OBJ_METHODDEF \
{"txt2obj", (PyCFunction)_ssl_txt2obj, METH_FASTCALL, _ssl_txt2obj__doc__},
{"txt2obj", (PyCFunction)_ssl_txt2obj, METH_FASTCALL|METH_KEYWORDS, _ssl_txt2obj__doc__},
static PyObject *
_ssl_txt2obj_impl(PyObject *module, const char *txt, int name);
......@@ -1089,7 +1077,7 @@ PyDoc_STRVAR(_ssl_enum_certificates__doc__,
"a set of OIDs or the boolean True.");
#define _SSL_ENUM_CERTIFICATES_METHODDEF \
{"enum_certificates", (PyCFunction)_ssl_enum_certificates, METH_FASTCALL, _ssl_enum_certificates__doc__},
{"enum_certificates", (PyCFunction)_ssl_enum_certificates, METH_FASTCALL|METH_KEYWORDS, _ssl_enum_certificates__doc__},
static PyObject *
_ssl_enum_certificates_impl(PyObject *module, const char *store_name);
......@@ -1128,7 +1116,7 @@ PyDoc_STRVAR(_ssl_enum_crls__doc__,
"X509_ASN_ENCODING or PKCS_7_ASN_ENCODING.");
#define _SSL_ENUM_CRLS_METHODDEF \
{"enum_crls", (PyCFunction)_ssl_enum_crls, METH_FASTCALL, _ssl_enum_crls__doc__},
{"enum_crls", (PyCFunction)_ssl_enum_crls, METH_FASTCALL|METH_KEYWORDS, _ssl_enum_crls__doc__},
static PyObject *
_ssl_enum_crls_impl(PyObject *module, const char *store_name);
......@@ -1180,4 +1168,4 @@ exit:
#ifndef _SSL_ENUM_CRLS_METHODDEF
#define _SSL_ENUM_CRLS_METHODDEF
#endif /* !defined(_SSL_ENUM_CRLS_METHODDEF) */
/*[clinic end generated code: output=30284eec805dbdf8 input=a9049054013a1b77]*/
/*[clinic end generated code: output=2d1424e6cc647fa8 input=a9049054013a1b77]*/
......@@ -84,7 +84,7 @@ PyDoc_STRVAR(Struct_unpack_from__doc__,
"See help(struct) for more on format strings.");
#define STRUCT_UNPACK_FROM_METHODDEF \
{"unpack_from", (PyCFunction)Struct_unpack_from, METH_FASTCALL, Struct_unpack_from__doc__},
{"unpack_from", (PyCFunction)Struct_unpack_from, METH_FASTCALL|METH_KEYWORDS, Struct_unpack_from__doc__},
static PyObject *
Struct_unpack_from_impl(PyStructObject *self, Py_buffer *buffer,
......@@ -198,16 +198,12 @@ static PyObject *
unpack_impl(PyObject *module, PyStructObject *s_object, Py_buffer *buffer);
static PyObject *
unpack(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unpack(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyStructObject *s_object = NULL;
Py_buffer buffer = {NULL, NULL};
if (!_PyArg_NoStackKeywords("unpack", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&y*:unpack",
cache_struct_converter, &s_object, &buffer)) {
goto exit;
......@@ -236,7 +232,7 @@ PyDoc_STRVAR(unpack_from__doc__,
"See help(struct) for more on format strings.");
#define UNPACK_FROM_METHODDEF \
{"unpack_from", (PyCFunction)unpack_from, METH_FASTCALL, unpack_from__doc__},
{"unpack_from", (PyCFunction)unpack_from, METH_FASTCALL|METH_KEYWORDS, unpack_from__doc__},
static PyObject *
unpack_from_impl(PyObject *module, PyStructObject *s_object,
......@@ -288,16 +284,12 @@ iter_unpack_impl(PyObject *module, PyStructObject *s_object,
PyObject *buffer);
static PyObject *
iter_unpack(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
iter_unpack(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyStructObject *s_object = NULL;
PyObject *buffer;
if (!_PyArg_NoStackKeywords("iter_unpack", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&O:iter_unpack",
cache_struct_converter, &s_object, &buffer)) {
goto exit;
......@@ -310,4 +302,4 @@ exit:
return return_value;
}
/*[clinic end generated code: output=351350320f31ca82 input=a9049054013a1b77]*/
/*[clinic end generated code: output=fce060787b4c5261 input=a9049054013a1b77]*/
......@@ -263,16 +263,12 @@ _tkinter_tkapp_createcommand_impl(TkappObject *self, const char *name,
PyObject *func);
static PyObject *
_tkinter_tkapp_createcommand(TkappObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_tkapp_createcommand(TkappObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *name;
PyObject *func;
if (!_PyArg_NoStackKeywords("createcommand", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "sO:createcommand",
&name, &func)) {
goto exit;
......@@ -324,17 +320,13 @@ _tkinter_tkapp_createfilehandler_impl(TkappObject *self, PyObject *file,
int mask, PyObject *func);
static PyObject *
_tkinter_tkapp_createfilehandler(TkappObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_tkapp_createfilehandler(TkappObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *file;
int mask;
PyObject *func;
if (!_PyArg_NoStackKeywords("createfilehandler", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "OiO:createfilehandler",
&file, &mask, &func)) {
goto exit;
......@@ -389,16 +381,12 @@ _tkinter_tkapp_createtimerhandler_impl(TkappObject *self, int milliseconds,
PyObject *func);
static PyObject *
_tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_tkapp_createtimerhandler(TkappObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int milliseconds;
PyObject *func;
if (!_PyArg_NoStackKeywords("createtimerhandler", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "iO:createtimerhandler",
&milliseconds, &func)) {
goto exit;
......@@ -421,15 +409,11 @@ static PyObject *
_tkinter_tkapp_mainloop_impl(TkappObject *self, int threshold);
static PyObject *
_tkinter_tkapp_mainloop(TkappObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_tkapp_mainloop(TkappObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int threshold = 0;
if (!_PyArg_NoStackKeywords("mainloop", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|i:mainloop",
&threshold)) {
goto exit;
......@@ -452,15 +436,11 @@ static PyObject *
_tkinter_tkapp_dooneevent_impl(TkappObject *self, int flags);
static PyObject *
_tkinter_tkapp_dooneevent(TkappObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_tkapp_dooneevent(TkappObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int flags = 0;
if (!_PyArg_NoStackKeywords("dooneevent", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|i:dooneevent",
&flags)) {
goto exit;
......@@ -572,7 +552,7 @@ _tkinter_create_impl(PyObject *module, const char *screenName,
const char *use);
static PyObject *
_tkinter_create(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tkinter_create(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *screenName = NULL;
......@@ -584,10 +564,6 @@ _tkinter_create(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *k
int sync = 0;
const char *use = NULL;
if (!_PyArg_NoStackKeywords("create", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|zssiiiiz:create",
&screenName, &baseName, &className, &interactive, &wantobjects, &wantTk, &sync, &use)) {
goto exit;
......@@ -662,4 +638,4 @@ exit:
#ifndef _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#define _TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF
#endif /* !defined(_TKINTER_TKAPP_DELETEFILEHANDLER_METHODDEF) */
/*[clinic end generated code: output=ed14e0bb0cd9c8e0 input=a9049054013a1b77]*/
/*[clinic end generated code: output=3b9241f7c703ae4f input=a9049054013a1b77]*/
......@@ -90,15 +90,11 @@ static PyObject *
_tracemalloc_start_impl(PyObject *module, Py_ssize_t nframe);
static PyObject *
_tracemalloc_start(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_tracemalloc_start(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t nframe = 1;
if (!_PyArg_NoStackKeywords("start", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:start",
&nframe)) {
goto exit;
......@@ -189,4 +185,4 @@ _tracemalloc_get_traced_memory(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return _tracemalloc_get_traced_memory_impl(module);
}
/*[clinic end generated code: output=ca7b197d1bdcdf27 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c9a0111391b3ec45 input=a9049054013a1b77]*/
......@@ -44,16 +44,12 @@ _weakref__remove_dead_weakref_impl(PyObject *module, PyObject *dct,
PyObject *key);
static PyObject *
_weakref__remove_dead_weakref(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_weakref__remove_dead_weakref(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *dct;
PyObject *key;
if (!_PyArg_NoStackKeywords("_remove_dead_weakref", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O!O:_remove_dead_weakref",
&PyDict_Type, &dct, &key)) {
goto exit;
......@@ -63,4 +59,4 @@ _weakref__remove_dead_weakref(PyObject *module, PyObject **args, Py_ssize_t narg
exit:
return return_value;
}
/*[clinic end generated code: output=05ecbb46c85839a2 input=a9049054013a1b77]*/
/*[clinic end generated code: output=87ddb70850080222 input=a9049054013a1b77]*/
This diff is collapsed.
......@@ -71,15 +71,11 @@ static PyObject *
array_array_pop_impl(arrayobject *self, Py_ssize_t i);
static PyObject *
array_array_pop(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
array_array_pop(arrayobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t i = -1;
if (!_PyArg_NoStackKeywords("pop", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|n:pop",
&i)) {
goto exit;
......@@ -112,16 +108,12 @@ static PyObject *
array_array_insert_impl(arrayobject *self, Py_ssize_t i, PyObject *v);
static PyObject *
array_array_insert(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
array_array_insert(arrayobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t i;
PyObject *v;
if (!_PyArg_NoStackKeywords("insert", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "nO:insert",
&i, &v)) {
goto exit;
......@@ -214,16 +206,12 @@ static PyObject *
array_array_fromfile_impl(arrayobject *self, PyObject *f, Py_ssize_t n);
static PyObject *
array_array_fromfile(arrayobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
array_array_fromfile(arrayobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *f;
Py_ssize_t n;
if (!_PyArg_NoStackKeywords("fromfile", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "On:fromfile",
&f, &n)) {
goto exit;
......@@ -464,7 +452,7 @@ array__array_reconstructor_impl(PyObject *module, PyTypeObject *arraytype,
PyObject *items);
static PyObject *
array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyTypeObject *arraytype;
......@@ -472,10 +460,6 @@ array__array_reconstructor(PyObject *module, PyObject **args, Py_ssize_t nargs,
enum machine_format_code mformat_code;
PyObject *items;
if (!_PyArg_NoStackKeywords("_array_reconstructor", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "OCiO:_array_reconstructor",
&arraytype, &typecode, &mformat_code, &items)) {
goto exit;
......@@ -521,4 +505,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
/*[clinic end generated code: output=fb4a67e697d7c0b0 input=a9049054013a1b77]*/
/*[clinic end generated code: output=c7dfe61312b236a9 input=a9049054013a1b77]*/
This diff is collapsed.
......@@ -40,7 +40,7 @@ PyDoc_STRVAR(binascii_b2a_uu__doc__,
"Uuencode line of data.");
#define BINASCII_B2A_UU_METHODDEF \
{"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_FASTCALL, binascii_b2a_uu__doc__},
{"b2a_uu", (PyCFunction)binascii_b2a_uu, METH_FASTCALL|METH_KEYWORDS, binascii_b2a_uu__doc__},
static PyObject *
binascii_b2a_uu_impl(PyObject *module, Py_buffer *data, int backtick);
......@@ -107,7 +107,7 @@ PyDoc_STRVAR(binascii_b2a_base64__doc__,
"Base64-code line of data.");
#define BINASCII_B2A_BASE64_METHODDEF \
{"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_FASTCALL, binascii_b2a_base64__doc__},
{"b2a_base64", (PyCFunction)binascii_b2a_base64, METH_FASTCALL|METH_KEYWORDS, binascii_b2a_base64__doc__},
static PyObject *
binascii_b2a_base64_impl(PyObject *module, Py_buffer *data, int newline);
......@@ -276,17 +276,13 @@ static unsigned int
binascii_crc_hqx_impl(PyObject *module, Py_buffer *data, unsigned int crc);
static PyObject *
binascii_crc_hqx(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
binascii_crc_hqx(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int crc;
unsigned int _return_value;
if (!_PyArg_NoStackKeywords("crc_hqx", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*I:crc_hqx",
&data, &crc)) {
goto exit;
......@@ -319,17 +315,13 @@ static unsigned int
binascii_crc32_impl(PyObject *module, Py_buffer *data, unsigned int crc);
static PyObject *
binascii_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
binascii_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int crc = 0;
unsigned int _return_value;
if (!_PyArg_NoStackKeywords("crc32", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*|I:crc32",
&data, &crc)) {
goto exit;
......@@ -492,7 +484,7 @@ PyDoc_STRVAR(binascii_a2b_qp__doc__,
"Decode a string of qp-encoded data.");
#define BINASCII_A2B_QP_METHODDEF \
{"a2b_qp", (PyCFunction)binascii_a2b_qp, METH_FASTCALL, binascii_a2b_qp__doc__},
{"a2b_qp", (PyCFunction)binascii_a2b_qp, METH_FASTCALL|METH_KEYWORDS, binascii_a2b_qp__doc__},
static PyObject *
binascii_a2b_qp_impl(PyObject *module, Py_buffer *data, int header);
......@@ -531,7 +523,7 @@ PyDoc_STRVAR(binascii_b2a_qp__doc__,
"are both encoded. When quotetabs is set, space and tabs are encoded.");
#define BINASCII_B2A_QP_METHODDEF \
{"b2a_qp", (PyCFunction)binascii_b2a_qp, METH_FASTCALL, binascii_b2a_qp__doc__},
{"b2a_qp", (PyCFunction)binascii_b2a_qp, METH_FASTCALL|METH_KEYWORDS, binascii_b2a_qp__doc__},
static PyObject *
binascii_b2a_qp_impl(PyObject *module, Py_buffer *data, int quotetabs,
......@@ -562,4 +554,4 @@ exit:
return return_value;
}
/*[clinic end generated code: output=490f08a964e97390 input=a9049054013a1b77]*/
/*[clinic end generated code: output=2878727c0cf4f636 input=a9049054013a1b77]*/
......@@ -647,16 +647,12 @@ static PyObject *
cmath_log_impl(PyObject *module, Py_complex x, PyObject *y_obj);
static PyObject *
cmath_log(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
cmath_log(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_complex x;
PyObject *y_obj = NULL;
if (!_PyArg_NoStackKeywords("log", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "D|O:log",
&x, &y_obj)) {
goto exit;
......@@ -736,16 +732,12 @@ static PyObject *
cmath_rect_impl(PyObject *module, double r, double phi);
static PyObject *
cmath_rect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
cmath_rect(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double r;
double phi;
if (!_PyArg_NoStackKeywords("rect", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "dd:rect",
&r, &phi)) {
goto exit;
......@@ -859,7 +851,7 @@ PyDoc_STRVAR(cmath_isclose__doc__,
"not close to anything, even itself. inf and -inf are only close to themselves.");
#define CMATH_ISCLOSE_METHODDEF \
{"isclose", (PyCFunction)cmath_isclose, METH_FASTCALL, cmath_isclose__doc__},
{"isclose", (PyCFunction)cmath_isclose, METH_FASTCALL|METH_KEYWORDS, cmath_isclose__doc__},
static int
cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
......@@ -890,4 +882,4 @@ cmath_isclose(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
exit:
return return_value;
}
/*[clinic end generated code: output=11a0b5bb8a652de6 input=a9049054013a1b77]*/
/*[clinic end generated code: output=51ba28d27d10264e input=a9049054013a1b77]*/
......@@ -25,17 +25,13 @@ static PyObject *
fcntl_fcntl_impl(PyObject *module, int fd, int code, PyObject *arg);
static PyObject *
fcntl_fcntl(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
fcntl_fcntl(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int fd;
int code;
PyObject *arg = NULL;
if (!_PyArg_NoStackKeywords("fcntl", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&i|O:fcntl",
conv_descriptor, &fd, &code, &arg)) {
goto exit;
......@@ -87,7 +83,7 @@ fcntl_ioctl_impl(PyObject *module, int fd, unsigned int code,
PyObject *ob_arg, int mutate_arg);
static PyObject *
fcntl_ioctl(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
fcntl_ioctl(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int fd;
......@@ -95,10 +91,6 @@ fcntl_ioctl(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
PyObject *ob_arg = NULL;
int mutate_arg = 1;
if (!_PyArg_NoStackKeywords("ioctl", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&I|Op:ioctl",
conv_descriptor, &fd, &code, &ob_arg, &mutate_arg)) {
goto exit;
......@@ -125,16 +117,12 @@ static PyObject *
fcntl_flock_impl(PyObject *module, int fd, int code);
static PyObject *
fcntl_flock(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
fcntl_flock(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int fd;
int code;
if (!_PyArg_NoStackKeywords("flock", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&i:flock",
conv_descriptor, &fd, &code)) {
goto exit;
......@@ -180,7 +168,7 @@ fcntl_lockf_impl(PyObject *module, int fd, int code, PyObject *lenobj,
PyObject *startobj, int whence);
static PyObject *
fcntl_lockf(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
fcntl_lockf(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int fd;
......@@ -189,10 +177,6 @@ fcntl_lockf(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
PyObject *startobj = NULL;
int whence = 0;
if (!_PyArg_NoStackKeywords("lockf", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O&i|OOi:lockf",
conv_descriptor, &fd, &code, &lenobj, &startobj, &whence)) {
goto exit;
......@@ -202,4 +186,4 @@ fcntl_lockf(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnam
exit:
return return_value;
}
/*[clinic end generated code: output=f189ac833d1448af input=a9049054013a1b77]*/
/*[clinic end generated code: output=6105e3ada306f434 input=a9049054013a1b77]*/
......@@ -79,7 +79,7 @@ PyDoc_STRVAR(gc_collect__doc__,
"The number of unreachable objects is returned.");
#define GC_COLLECT_METHODDEF \
{"collect", (PyCFunction)gc_collect, METH_FASTCALL, gc_collect__doc__},
{"collect", (PyCFunction)gc_collect, METH_FASTCALL|METH_KEYWORDS, gc_collect__doc__},
static Py_ssize_t
gc_collect_impl(PyObject *module, int generation);
......@@ -255,4 +255,4 @@ PyDoc_STRVAR(gc_is_tracked__doc__,
#define GC_IS_TRACKED_METHODDEF \
{"is_tracked", (PyCFunction)gc_is_tracked, METH_O, gc_is_tracked__doc__},
/*[clinic end generated code: output=8f487abc53fe4161 input=a9049054013a1b77]*/
/*[clinic end generated code: output=5a58583f00ab018e input=a9049054013a1b77]*/
......@@ -11,7 +11,7 @@ PyDoc_STRVAR(grp_getgrgid__doc__,
"If id is not valid, raise KeyError.");
#define GRP_GETGRGID_METHODDEF \
{"getgrgid", (PyCFunction)grp_getgrgid, METH_FASTCALL, grp_getgrgid__doc__},
{"getgrgid", (PyCFunction)grp_getgrgid, METH_FASTCALL|METH_KEYWORDS, grp_getgrgid__doc__},
static PyObject *
grp_getgrgid_impl(PyObject *module, PyObject *id);
......@@ -43,7 +43,7 @@ PyDoc_STRVAR(grp_getgrnam__doc__,
"If name is not valid, raise KeyError.");
#define GRP_GETGRNAM_METHODDEF \
{"getgrnam", (PyCFunction)grp_getgrnam, METH_FASTCALL, grp_getgrnam__doc__},
{"getgrnam", (PyCFunction)grp_getgrnam, METH_FASTCALL|METH_KEYWORDS, grp_getgrnam__doc__},
static PyObject *
grp_getgrnam_impl(PyObject *module, PyObject *name);
......@@ -86,4 +86,4 @@ grp_getgrall(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return grp_getgrall_impl(module);
}
/*[clinic end generated code: output=fb690db5e676d378 input=a9049054013a1b77]*/
/*[clinic end generated code: output=e7ef2cbc437eedcb input=a9049054013a1b77]*/
......@@ -15,16 +15,12 @@ static PyObject *
math_gcd_impl(PyObject *module, PyObject *a, PyObject *b);
static PyObject *
math_gcd(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
math_gcd(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *a;
PyObject *b;
if (!_PyArg_NoStackKeywords("gcd", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "gcd",
2, 2,
&a, &b)) {
......@@ -136,16 +132,12 @@ static PyObject *
math_ldexp_impl(PyObject *module, double x, PyObject *i);
static PyObject *
math_ldexp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
math_ldexp(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
PyObject *i;
if (!_PyArg_NoStackKeywords("ldexp", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "dO:ldexp",
&x, &i)) {
goto exit;
......@@ -261,16 +253,12 @@ static PyObject *
math_fmod_impl(PyObject *module, double x, double y);
static PyObject *
math_fmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
math_fmod(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
if (!_PyArg_NoStackKeywords("fmod", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "dd:fmod",
&x, &y)) {
goto exit;
......@@ -294,16 +282,12 @@ static PyObject *
math_hypot_impl(PyObject *module, double x, double y);
static PyObject *
math_hypot(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
math_hypot(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
if (!_PyArg_NoStackKeywords("hypot", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "dd:hypot",
&x, &y)) {
goto exit;
......@@ -327,16 +311,12 @@ static PyObject *
math_pow_impl(PyObject *module, double x, double y);
static PyObject *
math_pow(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
math_pow(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
if (!_PyArg_NoStackKeywords("pow", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "dd:pow",
&x, &y)) {
goto exit;
......@@ -505,7 +485,7 @@ PyDoc_STRVAR(math_isclose__doc__,
"only close to themselves.");
#define MATH_ISCLOSE_METHODDEF \
{"isclose", (PyCFunction)math_isclose, METH_FASTCALL, math_isclose__doc__},
{"isclose", (PyCFunction)math_isclose, METH_FASTCALL|METH_KEYWORDS, math_isclose__doc__},
static int
math_isclose_impl(PyObject *module, double a, double b, double rel_tol,
......@@ -536,4 +516,4 @@ math_isclose(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna
exit:
return return_value;
}
/*[clinic end generated code: output=c9f1ac6ded547cc8 input=a9049054013a1b77]*/
/*[clinic end generated code: output=d9bfbd645d273209 input=a9049054013a1b77]*/
......@@ -72,7 +72,7 @@ PyDoc_STRVAR(_md5_md5__doc__,
"Return a new MD5 hash object; optionally initialized with a string.");
#define _MD5_MD5_METHODDEF \
{"md5", (PyCFunction)_md5_md5, METH_FASTCALL, _md5_md5__doc__},
{"md5", (PyCFunction)_md5_md5, METH_FASTCALL|METH_KEYWORDS, _md5_md5__doc__},
static PyObject *
_md5_md5_impl(PyObject *module, PyObject *string);
......@@ -94,4 +94,4 @@ _md5_md5(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
exit:
return return_value;
}
/*[clinic end generated code: output=0a975e22cf33f833 input=a9049054013a1b77]*/
/*[clinic end generated code: output=3139ae340ad1ea4e input=a9049054013a1b77]*/
This diff is collapsed.
......@@ -18,16 +18,12 @@ pyexpat_xmlparser_Parse_impl(xmlparseobject *self, PyObject *data,
int isfinal);
static PyObject *
pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *data;
int isfinal = 0;
if (!_PyArg_NoStackKeywords("Parse", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "O|i:Parse",
&data, &isfinal)) {
goto exit;
......@@ -128,16 +124,12 @@ pyexpat_xmlparser_ExternalEntityParserCreate_impl(xmlparseobject *self,
const char *encoding);
static PyObject *
pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *context;
const char *encoding = NULL;
if (!_PyArg_NoStackKeywords("ExternalEntityParserCreate", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "z|s:ExternalEntityParserCreate",
&context, &encoding)) {
goto exit;
......@@ -199,15 +191,11 @@ static PyObject *
pyexpat_xmlparser_UseForeignDTD_impl(xmlparseobject *self, int flag);
static PyObject *
pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int flag = 1;
if (!_PyArg_NoStackKeywords("UseForeignDTD", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|p:UseForeignDTD",
&flag)) {
goto exit;
......@@ -245,7 +233,7 @@ PyDoc_STRVAR(pyexpat_ParserCreate__doc__,
"Return a new XML parser object.");
#define PYEXPAT_PARSERCREATE_METHODDEF \
{"ParserCreate", (PyCFunction)pyexpat_ParserCreate, METH_FASTCALL, pyexpat_ParserCreate__doc__},
{"ParserCreate", (PyCFunction)pyexpat_ParserCreate, METH_FASTCALL|METH_KEYWORDS, pyexpat_ParserCreate__doc__},
static PyObject *
pyexpat_ParserCreate_impl(PyObject *module, const char *encoding,
......@@ -301,4 +289,4 @@ exit:
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
/*[clinic end generated code: output=a51f9d31aff1a757 input=a9049054013a1b77]*/
/*[clinic end generated code: output=5d2e355f2b48e6c3 input=a9049054013a1b77]*/
......@@ -66,16 +66,12 @@ static PyObject *
resource_setrlimit_impl(PyObject *module, int resource, PyObject *limits);
static PyObject *
resource_setrlimit(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
resource_setrlimit(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int resource;
PyObject *limits;
if (!_PyArg_NoStackKeywords("setrlimit", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "iO:setrlimit",
&resource, &limits)) {
goto exit;
......@@ -161,4 +157,4 @@ exit:
#ifndef RESOURCE_PRLIMIT_METHODDEF
#define RESOURCE_PRLIMIT_METHODDEF
#endif /* !defined(RESOURCE_PRLIMIT_METHODDEF) */
/*[clinic end generated code: output=158aace6e532949e input=a9049054013a1b77]*/
/*[clinic end generated code: output=d7dabf49ce5b767f input=a9049054013a1b77]*/
......@@ -72,7 +72,7 @@ PyDoc_STRVAR(_sha1_sha1__doc__,
"Return a new SHA1 hash object; optionally initialized with a string.");
#define _SHA1_SHA1_METHODDEF \
{"sha1", (PyCFunction)_sha1_sha1, METH_FASTCALL, _sha1_sha1__doc__},
{"sha1", (PyCFunction)_sha1_sha1, METH_FASTCALL|METH_KEYWORDS, _sha1_sha1__doc__},
static PyObject *
_sha1_sha1_impl(PyObject *module, PyObject *string);
......@@ -94,4 +94,4 @@ _sha1_sha1(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwname
exit:
return return_value;
}
/*[clinic end generated code: output=8e6b04c7e0407be2 input=a9049054013a1b77]*/
/*[clinic end generated code: output=594cf600d6ba4776 input=a9049054013a1b77]*/
......@@ -72,7 +72,7 @@ PyDoc_STRVAR(_sha256_sha256__doc__,
"Return a new SHA-256 hash object; optionally initialized with a string.");
#define _SHA256_SHA256_METHODDEF \
{"sha256", (PyCFunction)_sha256_sha256, METH_FASTCALL, _sha256_sha256__doc__},
{"sha256", (PyCFunction)_sha256_sha256, METH_FASTCALL|METH_KEYWORDS, _sha256_sha256__doc__},
static PyObject *
_sha256_sha256_impl(PyObject *module, PyObject *string);
......@@ -102,7 +102,7 @@ PyDoc_STRVAR(_sha256_sha224__doc__,
"Return a new SHA-224 hash object; optionally initialized with a string.");
#define _SHA256_SHA224_METHODDEF \
{"sha224", (PyCFunction)_sha256_sha224, METH_FASTCALL, _sha256_sha224__doc__},
{"sha224", (PyCFunction)_sha256_sha224, METH_FASTCALL|METH_KEYWORDS, _sha256_sha224__doc__},
static PyObject *
_sha256_sha224_impl(PyObject *module, PyObject *string);
......@@ -124,4 +124,4 @@ _sha256_sha224(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw
exit:
return return_value;
}
/*[clinic end generated code: output=7ef4927ee2a3aac4 input=a9049054013a1b77]*/
/*[clinic end generated code: output=84e7b8365b3ca4d3 input=a9049054013a1b77]*/
......@@ -72,7 +72,7 @@ PyDoc_STRVAR(_sha512_sha512__doc__,
"Return a new SHA-512 hash object; optionally initialized with a string.");
#define _SHA512_SHA512_METHODDEF \
{"sha512", (PyCFunction)_sha512_sha512, METH_FASTCALL, _sha512_sha512__doc__},
{"sha512", (PyCFunction)_sha512_sha512, METH_FASTCALL|METH_KEYWORDS, _sha512_sha512__doc__},
static PyObject *
_sha512_sha512_impl(PyObject *module, PyObject *string);
......@@ -102,7 +102,7 @@ PyDoc_STRVAR(_sha512_sha384__doc__,
"Return a new SHA-384 hash object; optionally initialized with a string.");
#define _SHA512_SHA384_METHODDEF \
{"sha384", (PyCFunction)_sha512_sha384, METH_FASTCALL, _sha512_sha384__doc__},
{"sha384", (PyCFunction)_sha512_sha384, METH_FASTCALL|METH_KEYWORDS, _sha512_sha384__doc__},
static PyObject *
_sha512_sha384_impl(PyObject *module, PyObject *string);
......@@ -124,4 +124,4 @@ _sha512_sha384(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kw
exit:
return return_value;
}
/*[clinic end generated code: output=7bb7a49159e9b469 input=a9049054013a1b77]*/
/*[clinic end generated code: output=2f6ad0831d16c35f input=a9049054013a1b77]*/
......@@ -80,16 +80,12 @@ static PyObject *
signal_signal_impl(PyObject *module, int signalnum, PyObject *handler);
static PyObject *
signal_signal(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_signal(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int signalnum;
PyObject *handler;
if (!_PyArg_NoStackKeywords("signal", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "iO:signal",
&signalnum, &handler)) {
goto exit;
......@@ -151,16 +147,12 @@ static PyObject *
signal_siginterrupt_impl(PyObject *module, int signalnum, int flag);
static PyObject *
signal_siginterrupt(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_siginterrupt(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int signalnum;
int flag;
if (!_PyArg_NoStackKeywords("siginterrupt", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "ii:siginterrupt",
&signalnum, &flag)) {
goto exit;
......@@ -194,17 +186,13 @@ signal_setitimer_impl(PyObject *module, int which, double seconds,
double interval);
static PyObject *
signal_setitimer(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_setitimer(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int which;
double seconds;
double interval = 0.0;
if (!_PyArg_NoStackKeywords("setitimer", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "id|d:setitimer",
&which, &seconds, &interval)) {
goto exit;
......@@ -263,16 +251,12 @@ static PyObject *
signal_pthread_sigmask_impl(PyObject *module, int how, PyObject *mask);
static PyObject *
signal_pthread_sigmask(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_pthread_sigmask(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int how;
PyObject *mask;
if (!_PyArg_NoStackKeywords("pthread_sigmask", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "iO:pthread_sigmask",
&how, &mask)) {
goto exit;
......@@ -360,16 +344,12 @@ signal_sigtimedwait_impl(PyObject *module, PyObject *sigset,
PyObject *timeout_obj);
static PyObject *
signal_sigtimedwait(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_sigtimedwait(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *sigset;
PyObject *timeout_obj;
if (!_PyArg_NoStackKeywords("sigtimedwait", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "sigtimedwait",
2, 2,
&sigset, &timeout_obj)) {
......@@ -399,16 +379,12 @@ signal_pthread_kill_impl(PyObject *module, unsigned long thread_id,
int signalnum);
static PyObject *
signal_pthread_kill(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
signal_pthread_kill(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
unsigned long thread_id;
int signalnum;
if (!_PyArg_NoStackKeywords("pthread_kill", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "ki:pthread_kill",
&thread_id, &signalnum)) {
goto exit;
......@@ -464,4 +440,4 @@ exit:
#ifndef SIGNAL_PTHREAD_KILL_METHODDEF
#define SIGNAL_PTHREAD_KILL_METHODDEF
#endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */
/*[clinic end generated code: output=1a795d863c3bb302 input=a9049054013a1b77]*/
/*[clinic end generated code: output=9403ef0c5d0f7ee0 input=a9049054013a1b77]*/
......@@ -16,17 +16,13 @@ _symtable_symtable_impl(PyObject *module, const char *str,
PyObject *filename, const char *startstr);
static PyObject *
_symtable_symtable(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
_symtable_symtable(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *str;
PyObject *filename;
const char *startstr;
if (!_PyArg_NoStackKeywords("symtable", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "sO&s:symtable",
&str, PyUnicode_FSDecoder, &filename, &startstr)) {
goto exit;
......@@ -36,4 +32,4 @@ _symtable_symtable(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject
exit:
return return_value;
}
/*[clinic end generated code: output=388595f822b1fc79 input=a9049054013a1b77]*/
/*[clinic end generated code: output=ef379e514fde8477 input=a9049054013a1b77]*/
......@@ -20,16 +20,12 @@ unicodedata_UCD_decimal_impl(PyObject *self, int chr,
PyObject *default_value);
static PyObject *
unicodedata_UCD_decimal(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unicodedata_UCD_decimal(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int chr;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("decimal", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "C|O:decimal",
&chr, &default_value)) {
goto exit;
......@@ -57,16 +53,12 @@ static PyObject *
unicodedata_UCD_digit_impl(PyObject *self, int chr, PyObject *default_value);
static PyObject *
unicodedata_UCD_digit(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unicodedata_UCD_digit(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int chr;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("digit", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "C|O:digit",
&chr, &default_value)) {
goto exit;
......@@ -95,16 +87,12 @@ unicodedata_UCD_numeric_impl(PyObject *self, int chr,
PyObject *default_value);
static PyObject *
unicodedata_UCD_numeric(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unicodedata_UCD_numeric(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int chr;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("numeric", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "C|O:numeric",
&chr, &default_value)) {
goto exit;
......@@ -312,16 +300,12 @@ unicodedata_UCD_normalize_impl(PyObject *self, const char *form,
PyObject *input);
static PyObject *
unicodedata_UCD_normalize(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unicodedata_UCD_normalize(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
const char *form;
PyObject *input;
if (!_PyArg_NoStackKeywords("normalize", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "sU:normalize",
&form, &input)) {
goto exit;
......@@ -348,16 +332,12 @@ static PyObject *
unicodedata_UCD_name_impl(PyObject *self, int chr, PyObject *default_value);
static PyObject *
unicodedata_UCD_name(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
unicodedata_UCD_name(PyObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int chr;
PyObject *default_value = NULL;
if (!_PyArg_NoStackKeywords("name", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "C|O:name",
&chr, &default_value)) {
goto exit;
......@@ -399,4 +379,4 @@ unicodedata_UCD_lookup(PyObject *self, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=f69c0bbd7294870b input=a9049054013a1b77]*/
/*[clinic end generated code: output=7ec9a3c8fbfd3c3a input=a9049054013a1b77]*/
......@@ -14,7 +14,7 @@ PyDoc_STRVAR(zlib_compress__doc__,
" Compression level, in 0-9 or -1.");
#define ZLIB_COMPRESS_METHODDEF \
{"compress", (PyCFunction)zlib_compress, METH_FASTCALL, zlib_compress__doc__},
{"compress", (PyCFunction)zlib_compress, METH_FASTCALL|METH_KEYWORDS, zlib_compress__doc__},
static PyObject *
zlib_compress_impl(PyObject *module, Py_buffer *data, int level);
......@@ -57,7 +57,7 @@ PyDoc_STRVAR(zlib_decompress__doc__,
" The initial output buffer size.");
#define ZLIB_DECOMPRESS_METHODDEF \
{"decompress", (PyCFunction)zlib_decompress, METH_FASTCALL, zlib_decompress__doc__},
{"decompress", (PyCFunction)zlib_decompress, METH_FASTCALL|METH_KEYWORDS, zlib_decompress__doc__},
static PyObject *
zlib_decompress_impl(PyObject *module, Py_buffer *data, int wbits,
......@@ -119,7 +119,7 @@ PyDoc_STRVAR(zlib_compressobj__doc__,
" containing subsequences that are likely to occur in the input data.");
#define ZLIB_COMPRESSOBJ_METHODDEF \
{"compressobj", (PyCFunction)zlib_compressobj, METH_FASTCALL, zlib_compressobj__doc__},
{"compressobj", (PyCFunction)zlib_compressobj, METH_FASTCALL|METH_KEYWORDS, zlib_compressobj__doc__},
static PyObject *
zlib_compressobj_impl(PyObject *module, int level, int method, int wbits,
......@@ -166,7 +166,7 @@ PyDoc_STRVAR(zlib_decompressobj__doc__,
" dictionary as used by the compressor that produced the input data.");
#define ZLIB_DECOMPRESSOBJ_METHODDEF \
{"decompressobj", (PyCFunction)zlib_decompressobj, METH_FASTCALL, zlib_decompressobj__doc__},
{"decompressobj", (PyCFunction)zlib_decompressobj, METH_FASTCALL|METH_KEYWORDS, zlib_decompressobj__doc__},
static PyObject *
zlib_decompressobj_impl(PyObject *module, int wbits, PyObject *zdict);
......@@ -247,7 +247,7 @@ PyDoc_STRVAR(zlib_Decompress_decompress__doc__,
"Call the flush() method to clear these buffers.");
#define ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
{"decompress", (PyCFunction)zlib_Decompress_decompress, METH_FASTCALL, zlib_Decompress_decompress__doc__},
{"decompress", (PyCFunction)zlib_Decompress_decompress, METH_FASTCALL|METH_KEYWORDS, zlib_Decompress_decompress__doc__},
static PyObject *
zlib_Decompress_decompress_impl(compobject *self, Py_buffer *data,
......@@ -296,15 +296,11 @@ static PyObject *
zlib_Compress_flush_impl(compobject *self, int mode);
static PyObject *
zlib_Compress_flush(compobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
zlib_Compress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
int mode = Z_FINISH;
if (!_PyArg_NoStackKeywords("flush", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|i:flush",
&mode)) {
goto exit;
......@@ -375,15 +371,11 @@ static PyObject *
zlib_Decompress_flush_impl(compobject *self, Py_ssize_t length);
static PyObject *
zlib_Decompress_flush(compobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
zlib_Decompress_flush(compobject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_ssize_t length = DEF_BUF_SIZE;
if (!_PyArg_NoStackKeywords("flush", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "|O&:flush",
ssize_t_converter, &length)) {
goto exit;
......@@ -412,16 +404,12 @@ static PyObject *
zlib_adler32_impl(PyObject *module, Py_buffer *data, unsigned int value);
static PyObject *
zlib_adler32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
zlib_adler32(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int value = 1;
if (!_PyArg_NoStackKeywords("adler32", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*|I:adler32",
&data, &value)) {
goto exit;
......@@ -455,16 +443,12 @@ static PyObject *
zlib_crc32_impl(PyObject *module, Py_buffer *data, unsigned int value);
static PyObject *
zlib_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
zlib_crc32(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer data = {NULL, NULL};
unsigned int value = 0;
if (!_PyArg_NoStackKeywords("crc32", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*|I:crc32",
&data, &value)) {
goto exit;
......@@ -483,4 +467,4 @@ exit:
#ifndef ZLIB_COMPRESS_COPY_METHODDEF
#define ZLIB_COMPRESS_COPY_METHODDEF
#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
/*[clinic end generated code: output=c7abf02e091bcad3 input=a9049054013a1b77]*/
/*[clinic end generated code: output=e0184313eb431e95 input=a9049054013a1b77]*/
......@@ -520,10 +520,20 @@ _PyMethodDef_RawFastCallDict(PyMethodDef *method, PyObject *self, PyObject **arg
}
case METH_FASTCALL:
{
if (kwargs != NULL && PyDict_GET_SIZE(kwargs) != 0) {
goto no_keyword_error;
}
result = (*(_PyCFunctionFast)meth) (self, args, nargs);
break;
}
case METH_FASTCALL | METH_KEYWORDS:
{
PyObject **stack;
PyObject *kwnames;
_PyCFunctionFast fastmeth = (_PyCFunctionFast)meth;
_PyCFunctionFastWithKeywords fastmeth = (_PyCFunctionFastWithKeywords)meth;
if (_PyStack_UnpackDict(args, nargs, kwargs, &stack, &kwnames) < 0) {
goto exit;
......@@ -631,8 +641,15 @@ _PyMethodDef_RawFastCallKeywords(PyMethodDef *method, PyObject *self, PyObject *
break;
case METH_FASTCALL:
if (nkwargs) {
goto no_keyword_error;
}
result = ((_PyCFunctionFast)meth) (self, args, nargs);
break;
case METH_FASTCALL | METH_KEYWORDS:
/* Fast-path: avoid temporary dict to pass keyword arguments */
result = ((_PyCFunctionFast)meth) (self, args, nargs, kwnames);
result = ((_PyCFunctionFastWithKeywords)meth) (self, args, nargs, kwnames);
break;
case METH_VARARGS:
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ PyDoc_STRVAR(bytes_split__doc__,
" -1 (the default value) means no limit.");
#define BYTES_SPLIT_METHODDEF \
{"split", (PyCFunction)bytes_split, METH_FASTCALL, bytes_split__doc__},
{"split", (PyCFunction)bytes_split, METH_FASTCALL|METH_KEYWORDS, bytes_split__doc__},
static PyObject *
bytes_split_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
......@@ -136,7 +136,7 @@ PyDoc_STRVAR(bytes_rsplit__doc__,
"Splitting is done starting at the end of the bytes and working to the front.");
#define BYTES_RSPLIT_METHODDEF \
{"rsplit", (PyCFunction)bytes_rsplit, METH_FASTCALL, bytes_rsplit__doc__},
{"rsplit", (PyCFunction)bytes_rsplit, METH_FASTCALL|METH_KEYWORDS, bytes_rsplit__doc__},
static PyObject *
bytes_rsplit_impl(PyBytesObject *self, PyObject *sep, Py_ssize_t maxsplit);
......@@ -190,15 +190,11 @@ static PyObject *
bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
bytes_strip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
bytes_strip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
if (!_PyArg_NoStackKeywords("strip", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "strip",
0, 1,
&bytes)) {
......@@ -225,15 +221,11 @@ static PyObject *
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
bytes_lstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
bytes_lstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
if (!_PyArg_NoStackKeywords("lstrip", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
0, 1,
&bytes)) {
......@@ -260,15 +252,11 @@ static PyObject *
bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
static PyObject *
bytes_rstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
bytes_rstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *bytes = Py_None;
if (!_PyArg_NoStackKeywords("rstrip", kwnames)) {
goto exit;
}
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
0, 1,
&bytes)) {
......@@ -293,7 +281,7 @@ PyDoc_STRVAR(bytes_translate__doc__,
"The remaining characters are mapped through the given translation table.");
#define BYTES_TRANSLATE_METHODDEF \
{"translate", (PyCFunction)bytes_translate, METH_FASTCALL, bytes_translate__doc__},
{"translate", (PyCFunction)bytes_translate, METH_FASTCALL|METH_KEYWORDS, bytes_translate__doc__},
static PyObject *
bytes_translate_impl(PyBytesObject *self, PyObject *table,
......@@ -336,16 +324,12 @@ static PyObject *
bytes_maketrans_impl(Py_buffer *frm, Py_buffer *to);
static PyObject *
bytes_maketrans(void *null, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
bytes_maketrans(void *null, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer frm = {NULL, NULL};
Py_buffer to = {NULL, NULL};
if (!_PyArg_NoStackKeywords("maketrans", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*y*:maketrans",
&frm, &to)) {
goto exit;
......@@ -386,17 +370,13 @@ bytes_replace_impl(PyBytesObject *self, Py_buffer *old, Py_buffer *new,
Py_ssize_t count);
static PyObject *
bytes_replace(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
bytes_replace(PyBytesObject *self, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
Py_buffer old = {NULL, NULL};
Py_buffer new = {NULL, NULL};
Py_ssize_t count = -1;
if (!_PyArg_NoStackKeywords("replace", kwnames)) {
goto exit;
}
if (!_PyArg_ParseStack(args, nargs, "y*y*|n:replace",
&old, &new, &count)) {
goto exit;
......@@ -432,7 +412,7 @@ PyDoc_STRVAR(bytes_decode__doc__,
" can handle UnicodeDecodeErrors.");
#define BYTES_DECODE_METHODDEF \
{"decode", (PyCFunction)bytes_decode, METH_FASTCALL, bytes_decode__doc__},
{"decode", (PyCFunction)bytes_decode, METH_FASTCALL|METH_KEYWORDS, bytes_decode__doc__},
static PyObject *
bytes_decode_impl(PyBytesObject *self, const char *encoding,
......@@ -467,7 +447,7 @@ PyDoc_STRVAR(bytes_splitlines__doc__,
"true.");
#define BYTES_SPLITLINES_METHODDEF \
{"splitlines", (PyCFunction)bytes_splitlines, METH_FASTCALL, bytes_splitlines__doc__},
{"splitlines", (PyCFunction)bytes_splitlines, METH_FASTCALL|METH_KEYWORDS, bytes_splitlines__doc__},
static PyObject *
bytes_splitlines_impl(PyBytesObject *self, int keepends);
......@@ -519,4 +499,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
exit:
return return_value;
}
/*[clinic end generated code: output=a82999760469bbec input=a9049054013a1b77]*/
/*[clinic end generated code: output=9e3374bd7d04c163 input=a9049054013a1b77]*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment