Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
This commit is contained in:
parent
093119e4eb
commit
0c4a828cad
|
@ -2743,7 +2743,7 @@ typedef struct {
|
||||||
} XMLParserObject;
|
} XMLParserObject;
|
||||||
|
|
||||||
static PyObject*
|
static PyObject*
|
||||||
_elementtree_XMLParser_doctype(XMLParserObject* self, PyObject* args);
|
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames);
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
|
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
|
||||||
PyObject *pubid, PyObject *system);
|
PyObject *pubid, PyObject *system);
|
||||||
|
|
|
@ -309,22 +309,26 @@ PyDoc_STRVAR(_io__Buffered_truncate__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _IO__BUFFERED_TRUNCATE_METHODDEF \
|
#define _IO__BUFFERED_TRUNCATE_METHODDEF \
|
||||||
{"truncate", (PyCFunction)_io__Buffered_truncate, METH_VARARGS, _io__Buffered_truncate__doc__},
|
{"truncate", (PyCFunction)_io__Buffered_truncate, METH_FASTCALL, _io__Buffered_truncate__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io__Buffered_truncate_impl(buffered *self, PyObject *pos);
|
_io__Buffered_truncate_impl(buffered *self, PyObject *pos);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io__Buffered_truncate(buffered *self, PyObject *args)
|
_io__Buffered_truncate(buffered *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *pos = Py_None;
|
PyObject *pos = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "truncate",
|
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
||||||
0, 1,
|
0, 1,
|
||||||
&pos)) {
|
&pos)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io__Buffered_truncate_impl(self, pos);
|
return_value = _io__Buffered_truncate_impl(self, pos);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -496,4 +500,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=e6e584216a10d67e input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=e37b969b1acaa09c input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -158,22 +158,26 @@ PyDoc_STRVAR(_io_BytesIO_read__doc__,
|
||||||
"Return an empty bytes object at EOF.");
|
"Return an empty bytes object at EOF.");
|
||||||
|
|
||||||
#define _IO_BYTESIO_READ_METHODDEF \
|
#define _IO_BYTESIO_READ_METHODDEF \
|
||||||
{"read", (PyCFunction)_io_BytesIO_read, METH_VARARGS, _io_BytesIO_read__doc__},
|
{"read", (PyCFunction)_io_BytesIO_read, METH_FASTCALL, _io_BytesIO_read__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_read_impl(bytesio *self, PyObject *arg);
|
_io_BytesIO_read_impl(bytesio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_read(bytesio *self, PyObject *args)
|
_io_BytesIO_read(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "read",
|
if (!_PyArg_UnpackStack(args, nargs, "read",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_BytesIO_read_impl(self, arg);
|
return_value = _io_BytesIO_read_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -190,22 +194,26 @@ PyDoc_STRVAR(_io_BytesIO_read1__doc__,
|
||||||
"Return an empty bytes object at EOF.");
|
"Return an empty bytes object at EOF.");
|
||||||
|
|
||||||
#define _IO_BYTESIO_READ1_METHODDEF \
|
#define _IO_BYTESIO_READ1_METHODDEF \
|
||||||
{"read1", (PyCFunction)_io_BytesIO_read1, METH_VARARGS, _io_BytesIO_read1__doc__},
|
{"read1", (PyCFunction)_io_BytesIO_read1, METH_FASTCALL, _io_BytesIO_read1__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_read1_impl(bytesio *self, PyObject *size);
|
_io_BytesIO_read1_impl(bytesio *self, PyObject *size);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_read1(bytesio *self, PyObject *args)
|
_io_BytesIO_read1(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *size = Py_None;
|
PyObject *size = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "read1",
|
if (!_PyArg_UnpackStack(args, nargs, "read1",
|
||||||
0, 1,
|
0, 1,
|
||||||
&size)) {
|
&size)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("read1", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_BytesIO_read1_impl(self, size);
|
return_value = _io_BytesIO_read1_impl(self, size);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -223,22 +231,26 @@ PyDoc_STRVAR(_io_BytesIO_readline__doc__,
|
||||||
"Return an empty bytes object at EOF.");
|
"Return an empty bytes object at EOF.");
|
||||||
|
|
||||||
#define _IO_BYTESIO_READLINE_METHODDEF \
|
#define _IO_BYTESIO_READLINE_METHODDEF \
|
||||||
{"readline", (PyCFunction)_io_BytesIO_readline, METH_VARARGS, _io_BytesIO_readline__doc__},
|
{"readline", (PyCFunction)_io_BytesIO_readline, METH_FASTCALL, _io_BytesIO_readline__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_readline_impl(bytesio *self, PyObject *arg);
|
_io_BytesIO_readline_impl(bytesio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_readline(bytesio *self, PyObject *args)
|
_io_BytesIO_readline(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "readline",
|
if (!_PyArg_UnpackStack(args, nargs, "readline",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_BytesIO_readline_impl(self, arg);
|
return_value = _io_BytesIO_readline_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -256,22 +268,26 @@ PyDoc_STRVAR(_io_BytesIO_readlines__doc__,
|
||||||
"total number of bytes in the lines returned.");
|
"total number of bytes in the lines returned.");
|
||||||
|
|
||||||
#define _IO_BYTESIO_READLINES_METHODDEF \
|
#define _IO_BYTESIO_READLINES_METHODDEF \
|
||||||
{"readlines", (PyCFunction)_io_BytesIO_readlines, METH_VARARGS, _io_BytesIO_readlines__doc__},
|
{"readlines", (PyCFunction)_io_BytesIO_readlines, METH_FASTCALL, _io_BytesIO_readlines__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
|
_io_BytesIO_readlines_impl(bytesio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_readlines(bytesio *self, PyObject *args)
|
_io_BytesIO_readlines(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "readlines",
|
if (!_PyArg_UnpackStack(args, nargs, "readlines",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_BytesIO_readlines_impl(self, arg);
|
return_value = _io_BytesIO_readlines_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -323,22 +339,26 @@ PyDoc_STRVAR(_io_BytesIO_truncate__doc__,
|
||||||
"The current file position is unchanged. Returns the new size.");
|
"The current file position is unchanged. Returns the new size.");
|
||||||
|
|
||||||
#define _IO_BYTESIO_TRUNCATE_METHODDEF \
|
#define _IO_BYTESIO_TRUNCATE_METHODDEF \
|
||||||
{"truncate", (PyCFunction)_io_BytesIO_truncate, METH_VARARGS, _io_BytesIO_truncate__doc__},
|
{"truncate", (PyCFunction)_io_BytesIO_truncate, METH_FASTCALL, _io_BytesIO_truncate__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_truncate_impl(bytesio *self, PyObject *arg);
|
_io_BytesIO_truncate_impl(bytesio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_BytesIO_truncate(bytesio *self, PyObject *args)
|
_io_BytesIO_truncate(bytesio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "truncate",
|
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_BytesIO_truncate_impl(self, arg);
|
return_value = _io_BytesIO_truncate_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -452,4 +472,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=056f24eece495a8f input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=138ee6ad6951bc84 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -336,22 +336,26 @@ PyDoc_STRVAR(_io_FileIO_truncate__doc__,
|
||||||
"The current file position is changed to the value of size.");
|
"The current file position is changed to the value of size.");
|
||||||
|
|
||||||
#define _IO_FILEIO_TRUNCATE_METHODDEF \
|
#define _IO_FILEIO_TRUNCATE_METHODDEF \
|
||||||
{"truncate", (PyCFunction)_io_FileIO_truncate, METH_VARARGS, _io_FileIO_truncate__doc__},
|
{"truncate", (PyCFunction)_io_FileIO_truncate, METH_FASTCALL, _io_FileIO_truncate__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
|
_io_FileIO_truncate_impl(fileio *self, PyObject *posobj);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_FileIO_truncate(fileio *self, PyObject *args)
|
_io_FileIO_truncate(fileio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *posobj = NULL;
|
PyObject *posobj = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "truncate",
|
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
||||||
0, 1,
|
0, 1,
|
||||||
&posobj)) {
|
&posobj)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_FileIO_truncate_impl(self, posobj);
|
return_value = _io_FileIO_truncate_impl(self, posobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -381,4 +385,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
|
||||||
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
|
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
|
||||||
#define _IO_FILEIO_TRUNCATE_METHODDEF
|
#define _IO_FILEIO_TRUNCATE_METHODDEF
|
||||||
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
|
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
|
||||||
/*[clinic end generated code: output=5c2a0b493c0af58b input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=034d782a0daa82bd input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -48,22 +48,26 @@ PyDoc_STRVAR(_io_StringIO_read__doc__,
|
||||||
"is reached. Return an empty string at EOF.");
|
"is reached. Return an empty string at EOF.");
|
||||||
|
|
||||||
#define _IO_STRINGIO_READ_METHODDEF \
|
#define _IO_STRINGIO_READ_METHODDEF \
|
||||||
{"read", (PyCFunction)_io_StringIO_read, METH_VARARGS, _io_StringIO_read__doc__},
|
{"read", (PyCFunction)_io_StringIO_read, METH_FASTCALL, _io_StringIO_read__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_read_impl(stringio *self, PyObject *arg);
|
_io_StringIO_read_impl(stringio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_read(stringio *self, PyObject *args)
|
_io_StringIO_read(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "read",
|
if (!_PyArg_UnpackStack(args, nargs, "read",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_StringIO_read_impl(self, arg);
|
return_value = _io_StringIO_read_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -79,22 +83,26 @@ PyDoc_STRVAR(_io_StringIO_readline__doc__,
|
||||||
"Returns an empty string if EOF is hit immediately.");
|
"Returns an empty string if EOF is hit immediately.");
|
||||||
|
|
||||||
#define _IO_STRINGIO_READLINE_METHODDEF \
|
#define _IO_STRINGIO_READLINE_METHODDEF \
|
||||||
{"readline", (PyCFunction)_io_StringIO_readline, METH_VARARGS, _io_StringIO_readline__doc__},
|
{"readline", (PyCFunction)_io_StringIO_readline, METH_FASTCALL, _io_StringIO_readline__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_readline_impl(stringio *self, PyObject *arg);
|
_io_StringIO_readline_impl(stringio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_readline(stringio *self, PyObject *args)
|
_io_StringIO_readline(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "readline",
|
if (!_PyArg_UnpackStack(args, nargs, "readline",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_StringIO_readline_impl(self, arg);
|
return_value = _io_StringIO_readline_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -112,22 +120,26 @@ PyDoc_STRVAR(_io_StringIO_truncate__doc__,
|
||||||
"Returns the new absolute position.");
|
"Returns the new absolute position.");
|
||||||
|
|
||||||
#define _IO_STRINGIO_TRUNCATE_METHODDEF \
|
#define _IO_STRINGIO_TRUNCATE_METHODDEF \
|
||||||
{"truncate", (PyCFunction)_io_StringIO_truncate, METH_VARARGS, _io_StringIO_truncate__doc__},
|
{"truncate", (PyCFunction)_io_StringIO_truncate, METH_FASTCALL, _io_StringIO_truncate__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_truncate_impl(stringio *self, PyObject *arg);
|
_io_StringIO_truncate_impl(stringio *self, PyObject *arg);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_StringIO_truncate(stringio *self, PyObject *args)
|
_io_StringIO_truncate(stringio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "truncate",
|
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
||||||
0, 1,
|
0, 1,
|
||||||
&arg)) {
|
&arg)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_StringIO_truncate_impl(self, arg);
|
return_value = _io_StringIO_truncate_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -293,4 +305,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return _io_StringIO_seekable_impl(self);
|
return _io_StringIO_seekable_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=69bf262268745061 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=ce8018ec29def422 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -336,22 +336,26 @@ PyDoc_STRVAR(_io_TextIOWrapper_truncate__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF \
|
#define _IO_TEXTIOWRAPPER_TRUNCATE_METHODDEF \
|
||||||
{"truncate", (PyCFunction)_io_TextIOWrapper_truncate, METH_VARARGS, _io_TextIOWrapper_truncate__doc__},
|
{"truncate", (PyCFunction)_io_TextIOWrapper_truncate, METH_FASTCALL, _io_TextIOWrapper_truncate__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
|
_io_TextIOWrapper_truncate_impl(textio *self, PyObject *pos);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_io_TextIOWrapper_truncate(textio *self, PyObject *args)
|
_io_TextIOWrapper_truncate(textio *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *pos = Py_None;
|
PyObject *pos = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "truncate",
|
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
||||||
0, 1,
|
0, 1,
|
||||||
&pos)) {
|
&pos)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("truncate", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -476,4 +480,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return _io_TextIOWrapper_close_impl(self);
|
return _io_TextIOWrapper_close_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=1f8367c7a3301670 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=67eba50449900a96 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -192,23 +192,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_read__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF \
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READ_METHODDEF \
|
||||||
{"read", (PyCFunction)_multibytecodec_MultibyteStreamReader_read, METH_VARARGS, _multibytecodec_MultibyteStreamReader_read__doc__},
|
{"read", (PyCFunction)_multibytecodec_MultibyteStreamReader_read, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_read__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
|
_multibytecodec_MultibyteStreamReader_read_impl(MultibyteStreamReaderObject *self,
|
||||||
PyObject *sizeobj);
|
PyObject *sizeobj);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject *args)
|
_multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizeobj = Py_None;
|
PyObject *sizeobj = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "read",
|
if (!_PyArg_UnpackStack(args, nargs, "read",
|
||||||
0, 1,
|
0, 1,
|
||||||
&sizeobj)) {
|
&sizeobj)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("read", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
|
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -221,23 +225,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readline__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF \
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINE_METHODDEF \
|
||||||
{"readline", (PyCFunction)_multibytecodec_MultibyteStreamReader_readline, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readline__doc__},
|
{"readline", (PyCFunction)_multibytecodec_MultibyteStreamReader_readline, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readline__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
|
_multibytecodec_MultibyteStreamReader_readline_impl(MultibyteStreamReaderObject *self,
|
||||||
PyObject *sizeobj);
|
PyObject *sizeobj);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject *args)
|
_multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizeobj = Py_None;
|
PyObject *sizeobj = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "readline",
|
if (!_PyArg_UnpackStack(args, nargs, "readline",
|
||||||
0, 1,
|
0, 1,
|
||||||
&sizeobj)) {
|
&sizeobj)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("readline", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
|
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -250,23 +258,27 @@ PyDoc_STRVAR(_multibytecodec_MultibyteStreamReader_readlines__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF \
|
#define _MULTIBYTECODEC_MULTIBYTESTREAMREADER_READLINES_METHODDEF \
|
||||||
{"readlines", (PyCFunction)_multibytecodec_MultibyteStreamReader_readlines, METH_VARARGS, _multibytecodec_MultibyteStreamReader_readlines__doc__},
|
{"readlines", (PyCFunction)_multibytecodec_MultibyteStreamReader_readlines, METH_FASTCALL, _multibytecodec_MultibyteStreamReader_readlines__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
|
_multibytecodec_MultibyteStreamReader_readlines_impl(MultibyteStreamReaderObject *self,
|
||||||
PyObject *sizehintobj);
|
PyObject *sizehintobj);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject *args)
|
_multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizehintobj = Py_None;
|
PyObject *sizehintobj = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "readlines",
|
if (!_PyArg_UnpackStack(args, nargs, "readlines",
|
||||||
0, 1,
|
0, 1,
|
||||||
&sizehintobj)) {
|
&sizehintobj)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("readlines", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
|
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -330,4 +342,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
|
||||||
|
|
||||||
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
|
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
|
||||||
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
|
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
|
||||||
/*[clinic end generated code: output=7d6a05b0a581fd17 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=26710ffd4b3c7d7e input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -423,24 +423,28 @@ PyDoc_STRVAR(_elementtree_Element_makeelement__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF \
|
#define _ELEMENTTREE_ELEMENT_MAKEELEMENT_METHODDEF \
|
||||||
{"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_VARARGS, _elementtree_Element_makeelement__doc__},
|
{"makeelement", (PyCFunction)_elementtree_Element_makeelement, METH_FASTCALL, _elementtree_Element_makeelement__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
|
_elementtree_Element_makeelement_impl(ElementObject *self, PyObject *tag,
|
||||||
PyObject *attrib);
|
PyObject *attrib);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_Element_makeelement(ElementObject *self, PyObject *args)
|
_elementtree_Element_makeelement(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *tag;
|
PyObject *tag;
|
||||||
PyObject *attrib;
|
PyObject *attrib;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "makeelement",
|
if (!_PyArg_UnpackStack(args, nargs, "makeelement",
|
||||||
2, 2,
|
2, 2,
|
||||||
&tag, &attrib)) {
|
&tag, &attrib)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("makeelement", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
|
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -479,24 +483,28 @@ PyDoc_STRVAR(_elementtree_Element_set__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _ELEMENTTREE_ELEMENT_SET_METHODDEF \
|
#define _ELEMENTTREE_ELEMENT_SET_METHODDEF \
|
||||||
{"set", (PyCFunction)_elementtree_Element_set, METH_VARARGS, _elementtree_Element_set__doc__},
|
{"set", (PyCFunction)_elementtree_Element_set, METH_FASTCALL, _elementtree_Element_set__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_Element_set_impl(ElementObject *self, PyObject *key,
|
_elementtree_Element_set_impl(ElementObject *self, PyObject *key,
|
||||||
PyObject *value);
|
PyObject *value);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_Element_set(ElementObject *self, PyObject *args)
|
_elementtree_Element_set(ElementObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "set",
|
if (!_PyArg_UnpackStack(args, nargs, "set",
|
||||||
2, 2,
|
2, 2,
|
||||||
&key, &value)) {
|
&key, &value)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("set", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _elementtree_Element_set_impl(self, key, value);
|
return_value = _elementtree_Element_set_impl(self, key, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -564,24 +572,28 @@ PyDoc_STRVAR(_elementtree_TreeBuilder_start__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _ELEMENTTREE_TREEBUILDER_START_METHODDEF \
|
#define _ELEMENTTREE_TREEBUILDER_START_METHODDEF \
|
||||||
{"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_VARARGS, _elementtree_TreeBuilder_start__doc__},
|
{"start", (PyCFunction)_elementtree_TreeBuilder_start, METH_FASTCALL, _elementtree_TreeBuilder_start__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
|
_elementtree_TreeBuilder_start_impl(TreeBuilderObject *self, PyObject *tag,
|
||||||
PyObject *attrs);
|
PyObject *attrs);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *args)
|
_elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *tag;
|
PyObject *tag;
|
||||||
PyObject *attrs = Py_None;
|
PyObject *attrs = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "start",
|
if (!_PyArg_UnpackStack(args, nargs, "start",
|
||||||
1, 2,
|
1, 2,
|
||||||
&tag, &attrs)) {
|
&tag, &attrs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("start", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
|
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -651,25 +663,29 @@ PyDoc_STRVAR(_elementtree_XMLParser_doctype__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF \
|
#define _ELEMENTTREE_XMLPARSER_DOCTYPE_METHODDEF \
|
||||||
{"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_VARARGS, _elementtree_XMLParser_doctype__doc__},
|
{"doctype", (PyCFunction)_elementtree_XMLParser_doctype, METH_FASTCALL, _elementtree_XMLParser_doctype__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
|
_elementtree_XMLParser_doctype_impl(XMLParserObject *self, PyObject *name,
|
||||||
PyObject *pubid, PyObject *system);
|
PyObject *pubid, PyObject *system);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject *args)
|
_elementtree_XMLParser_doctype(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
PyObject *pubid;
|
PyObject *pubid;
|
||||||
PyObject *system;
|
PyObject *system;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "doctype",
|
if (!_PyArg_UnpackStack(args, nargs, "doctype",
|
||||||
3, 3,
|
3, 3,
|
||||||
&name, &pubid, &system)) {
|
&name, &pubid, &system)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("doctype", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system);
|
return_value = _elementtree_XMLParser_doctype_impl(self, name, pubid, system);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -682,7 +698,7 @@ PyDoc_STRVAR(_elementtree_XMLParser__setevents__doc__,
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
#define _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF \
|
#define _ELEMENTTREE_XMLPARSER__SETEVENTS_METHODDEF \
|
||||||
{"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_VARARGS, _elementtree_XMLParser__setevents__doc__},
|
{"_setevents", (PyCFunction)_elementtree_XMLParser__setevents, METH_FASTCALL, _elementtree_XMLParser__setevents__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_XMLParser__setevents_impl(XMLParserObject *self,
|
_elementtree_XMLParser__setevents_impl(XMLParserObject *self,
|
||||||
|
@ -690,20 +706,24 @@ _elementtree_XMLParser__setevents_impl(XMLParserObject *self,
|
||||||
PyObject *events_to_report);
|
PyObject *events_to_report);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *args)
|
_elementtree_XMLParser__setevents(XMLParserObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *events_queue;
|
PyObject *events_queue;
|
||||||
PyObject *events_to_report = Py_None;
|
PyObject *events_to_report = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "_setevents",
|
if (!_PyArg_UnpackStack(args, nargs, "_setevents",
|
||||||
1, 2,
|
1, 2,
|
||||||
&events_queue, &events_to_report)) {
|
&events_queue, &events_to_report)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("_setevents", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
|
return_value = _elementtree_XMLParser__setevents_impl(self, events_queue, events_to_report);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=4e3d22c6f6d832b2 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=b69fa98c40917f58 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -9,23 +9,27 @@ PyDoc_STRVAR(_gdbm_gdbm_get__doc__,
|
||||||
"Get the value for key, or default if not present.");
|
"Get the value for key, or default if not present.");
|
||||||
|
|
||||||
#define _GDBM_GDBM_GET_METHODDEF \
|
#define _GDBM_GDBM_GET_METHODDEF \
|
||||||
{"get", (PyCFunction)_gdbm_gdbm_get, METH_VARARGS, _gdbm_gdbm_get__doc__},
|
{"get", (PyCFunction)_gdbm_gdbm_get, METH_FASTCALL, _gdbm_gdbm_get__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value);
|
_gdbm_gdbm_get_impl(dbmobject *self, PyObject *key, PyObject *default_value);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_gdbm_gdbm_get(dbmobject *self, PyObject *args)
|
_gdbm_gdbm_get(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "get",
|
if (!_PyArg_UnpackStack(args, nargs, "get",
|
||||||
1, 2,
|
1, 2,
|
||||||
&key, &default_value)) {
|
&key, &default_value)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("get", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _gdbm_gdbm_get_impl(self, key, default_value);
|
return_value = _gdbm_gdbm_get_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -39,24 +43,28 @@ PyDoc_STRVAR(_gdbm_gdbm_setdefault__doc__,
|
||||||
"Get value for key, or set it to default and return default if not present.");
|
"Get value for key, or set it to default and return default if not present.");
|
||||||
|
|
||||||
#define _GDBM_GDBM_SETDEFAULT_METHODDEF \
|
#define _GDBM_GDBM_SETDEFAULT_METHODDEF \
|
||||||
{"setdefault", (PyCFunction)_gdbm_gdbm_setdefault, METH_VARARGS, _gdbm_gdbm_setdefault__doc__},
|
{"setdefault", (PyCFunction)_gdbm_gdbm_setdefault, METH_FASTCALL, _gdbm_gdbm_setdefault__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
|
_gdbm_gdbm_setdefault_impl(dbmobject *self, PyObject *key,
|
||||||
PyObject *default_value);
|
PyObject *default_value);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_gdbm_gdbm_setdefault(dbmobject *self, PyObject *args)
|
_gdbm_gdbm_setdefault(dbmobject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "setdefault",
|
if (!_PyArg_UnpackStack(args, nargs, "setdefault",
|
||||||
1, 2,
|
1, 2,
|
||||||
&key, &default_value)) {
|
&key, &default_value)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("setdefault", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
|
return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -257,4 +265,4 @@ dbmopen(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=1e47d62a35eeba8b input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=03a3a63a814ada93 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -199,7 +199,7 @@ PyDoc_STRVAR(_pickle_Unpickler_find_class__doc__,
|
||||||
"needed. Both arguments passed are str objects.");
|
"needed. Both arguments passed are str objects.");
|
||||||
|
|
||||||
#define _PICKLE_UNPICKLER_FIND_CLASS_METHODDEF \
|
#define _PICKLE_UNPICKLER_FIND_CLASS_METHODDEF \
|
||||||
{"find_class", (PyCFunction)_pickle_Unpickler_find_class, METH_VARARGS, _pickle_Unpickler_find_class__doc__},
|
{"find_class", (PyCFunction)_pickle_Unpickler_find_class, METH_FASTCALL, _pickle_Unpickler_find_class__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_pickle_Unpickler_find_class_impl(UnpicklerObject *self,
|
_pickle_Unpickler_find_class_impl(UnpicklerObject *self,
|
||||||
|
@ -207,17 +207,21 @@ _pickle_Unpickler_find_class_impl(UnpicklerObject *self,
|
||||||
PyObject *global_name);
|
PyObject *global_name);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject *args)
|
_pickle_Unpickler_find_class(UnpicklerObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *module_name;
|
PyObject *module_name;
|
||||||
PyObject *global_name;
|
PyObject *global_name;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "find_class",
|
if (!_PyArg_UnpackStack(args, nargs, "find_class",
|
||||||
2, 2,
|
2, 2,
|
||||||
&module_name, &global_name)) {
|
&module_name, &global_name)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("find_class", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _pickle_Unpickler_find_class_impl(self, module_name, global_name);
|
return_value = _pickle_Unpickler_find_class_impl(self, module_name, global_name);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -560,4 +564,4 @@ _pickle_loads(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=d7222d1219039fbd input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=b921d325b2f7a096 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -551,23 +551,27 @@ PyDoc_STRVAR(_sre_SRE_Match_start__doc__,
|
||||||
"Return index of the start of the substring matched by group.");
|
"Return index of the start of the substring matched by group.");
|
||||||
|
|
||||||
#define _SRE_SRE_MATCH_START_METHODDEF \
|
#define _SRE_SRE_MATCH_START_METHODDEF \
|
||||||
{"start", (PyCFunction)_sre_SRE_Match_start, METH_VARARGS, _sre_SRE_Match_start__doc__},
|
{"start", (PyCFunction)_sre_SRE_Match_start, METH_FASTCALL, _sre_SRE_Match_start__doc__},
|
||||||
|
|
||||||
static Py_ssize_t
|
static Py_ssize_t
|
||||||
_sre_SRE_Match_start_impl(MatchObject *self, PyObject *group);
|
_sre_SRE_Match_start_impl(MatchObject *self, PyObject *group);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_sre_SRE_Match_start(MatchObject *self, PyObject *args)
|
_sre_SRE_Match_start(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "start",
|
if (!_PyArg_UnpackStack(args, nargs, "start",
|
||||||
0, 1,
|
0, 1,
|
||||||
&group)) {
|
&group)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("start", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
_return_value = _sre_SRE_Match_start_impl(self, group);
|
_return_value = _sre_SRE_Match_start_impl(self, group);
|
||||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -585,23 +589,27 @@ PyDoc_STRVAR(_sre_SRE_Match_end__doc__,
|
||||||
"Return index of the end of the substring matched by group.");
|
"Return index of the end of the substring matched by group.");
|
||||||
|
|
||||||
#define _SRE_SRE_MATCH_END_METHODDEF \
|
#define _SRE_SRE_MATCH_END_METHODDEF \
|
||||||
{"end", (PyCFunction)_sre_SRE_Match_end, METH_VARARGS, _sre_SRE_Match_end__doc__},
|
{"end", (PyCFunction)_sre_SRE_Match_end, METH_FASTCALL, _sre_SRE_Match_end__doc__},
|
||||||
|
|
||||||
static Py_ssize_t
|
static Py_ssize_t
|
||||||
_sre_SRE_Match_end_impl(MatchObject *self, PyObject *group);
|
_sre_SRE_Match_end_impl(MatchObject *self, PyObject *group);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_sre_SRE_Match_end(MatchObject *self, PyObject *args)
|
_sre_SRE_Match_end(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "end",
|
if (!_PyArg_UnpackStack(args, nargs, "end",
|
||||||
0, 1,
|
0, 1,
|
||||||
&group)) {
|
&group)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("end", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
_return_value = _sre_SRE_Match_end_impl(self, group);
|
_return_value = _sre_SRE_Match_end_impl(self, group);
|
||||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -619,22 +627,26 @@ PyDoc_STRVAR(_sre_SRE_Match_span__doc__,
|
||||||
"For MatchObject m, return the 2-tuple (m.start(group), m.end(group)).");
|
"For MatchObject m, return the 2-tuple (m.start(group), m.end(group)).");
|
||||||
|
|
||||||
#define _SRE_SRE_MATCH_SPAN_METHODDEF \
|
#define _SRE_SRE_MATCH_SPAN_METHODDEF \
|
||||||
{"span", (PyCFunction)_sre_SRE_Match_span, METH_VARARGS, _sre_SRE_Match_span__doc__},
|
{"span", (PyCFunction)_sre_SRE_Match_span, METH_FASTCALL, _sre_SRE_Match_span__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group);
|
_sre_SRE_Match_span_impl(MatchObject *self, PyObject *group);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_sre_SRE_Match_span(MatchObject *self, PyObject *args)
|
_sre_SRE_Match_span(MatchObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "span",
|
if (!_PyArg_UnpackStack(args, nargs, "span",
|
||||||
0, 1,
|
0, 1,
|
||||||
&group)) {
|
&group)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("span", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _sre_SRE_Match_span_impl(self, group);
|
return_value = _sre_SRE_Match_span_impl(self, group);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -720,4 +732,4 @@ _sre_SRE_Scanner_search(ScannerObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return _sre_SRE_Scanner_search_impl(self);
|
return _sre_SRE_Scanner_search_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=3dff18d3b6110b86 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=5df18da8e2dc762c input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -353,24 +353,28 @@ PyDoc_STRVAR(signal_sigtimedwait__doc__,
|
||||||
"The timeout is specified in seconds, with floating point numbers allowed.");
|
"The timeout is specified in seconds, with floating point numbers allowed.");
|
||||||
|
|
||||||
#define SIGNAL_SIGTIMEDWAIT_METHODDEF \
|
#define SIGNAL_SIGTIMEDWAIT_METHODDEF \
|
||||||
{"sigtimedwait", (PyCFunction)signal_sigtimedwait, METH_VARARGS, signal_sigtimedwait__doc__},
|
{"sigtimedwait", (PyCFunction)signal_sigtimedwait, METH_FASTCALL, signal_sigtimedwait__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
signal_sigtimedwait_impl(PyObject *module, PyObject *sigset,
|
signal_sigtimedwait_impl(PyObject *module, PyObject *sigset,
|
||||||
PyObject *timeout_obj);
|
PyObject *timeout_obj);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
signal_sigtimedwait(PyObject *module, PyObject *args)
|
signal_sigtimedwait(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sigset;
|
PyObject *sigset;
|
||||||
PyObject *timeout_obj;
|
PyObject *timeout_obj;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "sigtimedwait",
|
if (!_PyArg_UnpackStack(args, nargs, "sigtimedwait",
|
||||||
2, 2,
|
2, 2,
|
||||||
&sigset, &timeout_obj)) {
|
&sigset, &timeout_obj)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("sigtimedwait", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = signal_sigtimedwait_impl(module, sigset, timeout_obj);
|
return_value = signal_sigtimedwait_impl(module, sigset, timeout_obj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -459,4 +463,4 @@ exit:
|
||||||
#ifndef SIGNAL_PTHREAD_KILL_METHODDEF
|
#ifndef SIGNAL_PTHREAD_KILL_METHODDEF
|
||||||
#define SIGNAL_PTHREAD_KILL_METHODDEF
|
#define SIGNAL_PTHREAD_KILL_METHODDEF
|
||||||
#endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */
|
#endif /* !defined(SIGNAL_PTHREAD_KILL_METHODDEF) */
|
||||||
/*[clinic end generated code: output=b49f7bfff44d1256 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=fab3dba32c058588 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -463,22 +463,26 @@ PyDoc_STRVAR(bytearray_strip__doc__,
|
||||||
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
|
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTEARRAY_STRIP_METHODDEF \
|
#define BYTEARRAY_STRIP_METHODDEF \
|
||||||
{"strip", (PyCFunction)bytearray_strip, METH_VARARGS, bytearray_strip__doc__},
|
{"strip", (PyCFunction)bytearray_strip, METH_FASTCALL, bytearray_strip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes);
|
bytearray_strip_impl(PyByteArrayObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_strip(PyByteArrayObject *self, PyObject *args)
|
bytearray_strip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "strip",
|
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("strip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytearray_strip_impl(self, bytes);
|
return_value = bytearray_strip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -494,22 +498,26 @@ PyDoc_STRVAR(bytearray_lstrip__doc__,
|
||||||
"If the argument is omitted or None, strip leading ASCII whitespace.");
|
"If the argument is omitted or None, strip leading ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTEARRAY_LSTRIP_METHODDEF \
|
#define BYTEARRAY_LSTRIP_METHODDEF \
|
||||||
{"lstrip", (PyCFunction)bytearray_lstrip, METH_VARARGS, bytearray_lstrip__doc__},
|
{"lstrip", (PyCFunction)bytearray_lstrip, METH_FASTCALL, bytearray_lstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes);
|
bytearray_lstrip_impl(PyByteArrayObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_lstrip(PyByteArrayObject *self, PyObject *args)
|
bytearray_lstrip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "lstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("lstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytearray_lstrip_impl(self, bytes);
|
return_value = bytearray_lstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -525,22 +533,26 @@ PyDoc_STRVAR(bytearray_rstrip__doc__,
|
||||||
"If the argument is omitted or None, strip trailing ASCII whitespace.");
|
"If the argument is omitted or None, strip trailing ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTEARRAY_RSTRIP_METHODDEF \
|
#define BYTEARRAY_RSTRIP_METHODDEF \
|
||||||
{"rstrip", (PyCFunction)bytearray_rstrip, METH_VARARGS, bytearray_rstrip__doc__},
|
{"rstrip", (PyCFunction)bytearray_rstrip, METH_FASTCALL, bytearray_rstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes);
|
bytearray_rstrip_impl(PyByteArrayObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytearray_rstrip(PyByteArrayObject *self, PyObject *args)
|
bytearray_rstrip(PyByteArrayObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "rstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("rstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytearray_rstrip_impl(self, bytes);
|
return_value = bytearray_rstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -731,4 +743,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return bytearray_sizeof_impl(self);
|
return bytearray_sizeof_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=e6c057d1cd7c2496 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=f5c364927425fae8 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -184,22 +184,26 @@ PyDoc_STRVAR(bytes_strip__doc__,
|
||||||
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
|
"If the argument is omitted or None, strip leading and trailing ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTES_STRIP_METHODDEF \
|
#define BYTES_STRIP_METHODDEF \
|
||||||
{"strip", (PyCFunction)bytes_strip, METH_VARARGS, bytes_strip__doc__},
|
{"strip", (PyCFunction)bytes_strip, METH_FASTCALL, bytes_strip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
|
bytes_strip_impl(PyBytesObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_strip(PyBytesObject *self, PyObject *args)
|
bytes_strip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "strip",
|
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("strip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytes_strip_impl(self, bytes);
|
return_value = bytes_strip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -215,22 +219,26 @@ PyDoc_STRVAR(bytes_lstrip__doc__,
|
||||||
"If the argument is omitted or None, strip leading ASCII whitespace.");
|
"If the argument is omitted or None, strip leading ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTES_LSTRIP_METHODDEF \
|
#define BYTES_LSTRIP_METHODDEF \
|
||||||
{"lstrip", (PyCFunction)bytes_lstrip, METH_VARARGS, bytes_lstrip__doc__},
|
{"lstrip", (PyCFunction)bytes_lstrip, METH_FASTCALL, bytes_lstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
|
bytes_lstrip_impl(PyBytesObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_lstrip(PyBytesObject *self, PyObject *args)
|
bytes_lstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "lstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("lstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytes_lstrip_impl(self, bytes);
|
return_value = bytes_lstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -246,22 +254,26 @@ PyDoc_STRVAR(bytes_rstrip__doc__,
|
||||||
"If the argument is omitted or None, strip trailing ASCII whitespace.");
|
"If the argument is omitted or None, strip trailing ASCII whitespace.");
|
||||||
|
|
||||||
#define BYTES_RSTRIP_METHODDEF \
|
#define BYTES_RSTRIP_METHODDEF \
|
||||||
{"rstrip", (PyCFunction)bytes_rstrip, METH_VARARGS, bytes_rstrip__doc__},
|
{"rstrip", (PyCFunction)bytes_rstrip, METH_FASTCALL, bytes_rstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
|
bytes_rstrip_impl(PyBytesObject *self, PyObject *bytes);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
bytes_rstrip(PyBytesObject *self, PyObject *args)
|
bytes_rstrip(PyBytesObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "rstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&bytes)) {
|
&bytes)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("rstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = bytes_rstrip_impl(self, bytes);
|
return_value = bytes_rstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -507,4 +519,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=2b8d3cff7e11045e input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=2504c1225108d348 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -9,23 +9,27 @@ PyDoc_STRVAR(dict_fromkeys__doc__,
|
||||||
"Returns a new dict with keys from iterable and values equal to value.");
|
"Returns a new dict with keys from iterable and values equal to value.");
|
||||||
|
|
||||||
#define DICT_FROMKEYS_METHODDEF \
|
#define DICT_FROMKEYS_METHODDEF \
|
||||||
{"fromkeys", (PyCFunction)dict_fromkeys, METH_VARARGS|METH_CLASS, dict_fromkeys__doc__},
|
{"fromkeys", (PyCFunction)dict_fromkeys, METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
|
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
dict_fromkeys(PyTypeObject *type, PyObject *args)
|
dict_fromkeys(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *iterable;
|
PyObject *iterable;
|
||||||
PyObject *value = Py_None;
|
PyObject *value = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "fromkeys",
|
if (!_PyArg_UnpackStack(args, nargs, "fromkeys",
|
||||||
1, 2,
|
1, 2,
|
||||||
&iterable, &value)) {
|
&iterable, &value)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("fromkeys", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = dict_fromkeys_impl(type, iterable, value);
|
return_value = dict_fromkeys_impl(type, iterable, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -40,4 +44,4 @@ PyDoc_STRVAR(dict___contains____doc__,
|
||||||
|
|
||||||
#define DICT___CONTAINS___METHODDEF \
|
#define DICT___CONTAINS___METHODDEF \
|
||||||
{"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
|
{"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
|
||||||
/*[clinic end generated code: output=926326109e3d9839 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=69f3d767ed44e8ec input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -471,27 +471,31 @@ PyDoc_STRVAR(unicode_strip__doc__,
|
||||||
"strip($self, chars=None, /)\n"
|
"strip($self, chars=None, /)\n"
|
||||||
"--\n"
|
"--\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Return a copy of the string with leading and trailing whitespace removed.\n"
|
"Return a copy of the string with leading and trailing whitespace remove.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"If chars is given and not None, remove characters in chars instead.");
|
"If chars is given and not None, remove characters in chars instead.");
|
||||||
|
|
||||||
#define UNICODE_STRIP_METHODDEF \
|
#define UNICODE_STRIP_METHODDEF \
|
||||||
{"strip", (PyCFunction)unicode_strip, METH_VARARGS, unicode_strip__doc__},
|
{"strip", (PyCFunction)unicode_strip, METH_FASTCALL, unicode_strip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_strip_impl(PyObject *self, PyObject *chars);
|
unicode_strip_impl(PyObject *self, PyObject *chars);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_strip(PyObject *self, PyObject *args)
|
unicode_strip(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = Py_None;
|
PyObject *chars = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "strip",
|
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&chars)) {
|
&chars)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("strip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = unicode_strip_impl(self, chars);
|
return_value = unicode_strip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -507,22 +511,26 @@ PyDoc_STRVAR(unicode_lstrip__doc__,
|
||||||
"If chars is given and not None, remove characters in chars instead.");
|
"If chars is given and not None, remove characters in chars instead.");
|
||||||
|
|
||||||
#define UNICODE_LSTRIP_METHODDEF \
|
#define UNICODE_LSTRIP_METHODDEF \
|
||||||
{"lstrip", (PyCFunction)unicode_lstrip, METH_VARARGS, unicode_lstrip__doc__},
|
{"lstrip", (PyCFunction)unicode_lstrip, METH_FASTCALL, unicode_lstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_lstrip_impl(PyObject *self, PyObject *chars);
|
unicode_lstrip_impl(PyObject *self, PyObject *chars);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_lstrip(PyObject *self, PyObject *args)
|
unicode_lstrip(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = NULL;
|
PyObject *chars = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "lstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&chars)) {
|
&chars)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("lstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = unicode_lstrip_impl(self, chars);
|
return_value = unicode_lstrip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -538,22 +546,26 @@ PyDoc_STRVAR(unicode_rstrip__doc__,
|
||||||
"If chars is given and not None, remove characters in chars instead.");
|
"If chars is given and not None, remove characters in chars instead.");
|
||||||
|
|
||||||
#define UNICODE_RSTRIP_METHODDEF \
|
#define UNICODE_RSTRIP_METHODDEF \
|
||||||
{"rstrip", (PyCFunction)unicode_rstrip, METH_VARARGS, unicode_rstrip__doc__},
|
{"rstrip", (PyCFunction)unicode_rstrip, METH_FASTCALL, unicode_rstrip__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_rstrip_impl(PyObject *self, PyObject *chars);
|
unicode_rstrip_impl(PyObject *self, PyObject *chars);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_rstrip(PyObject *self, PyObject *args)
|
unicode_rstrip(PyObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = NULL;
|
PyObject *chars = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "rstrip",
|
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
||||||
0, 1,
|
0, 1,
|
||||||
&chars)) {
|
&chars)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("rstrip", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = unicode_rstrip_impl(self, chars);
|
return_value = unicode_rstrip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -950,4 +962,4 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return unicode_sizeof_impl(self);
|
return unicode_sizeof_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=eb6a3ae361a1a379 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=3d73f3dfd6ec7d83 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -12453,14 +12453,14 @@ str.strip as unicode_strip
|
||||||
chars: object = None
|
chars: object = None
|
||||||
/
|
/
|
||||||
|
|
||||||
Return a copy of the string with leading and trailing whitespace removed.
|
Return a copy of the string with leading and trailing whitespace remove.
|
||||||
|
|
||||||
If chars is given and not None, remove characters in chars instead.
|
If chars is given and not None, remove characters in chars instead.
|
||||||
[clinic start generated code]*/
|
[clinic start generated code]*/
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
unicode_strip_impl(PyObject *self, PyObject *chars)
|
unicode_strip_impl(PyObject *self, PyObject *chars)
|
||||||
/*[clinic end generated code: output=ca19018454345d57 input=385289c6f423b954]*/
|
/*[clinic end generated code: output=ca19018454345d57 input=eefe24a1059c352b]*/
|
||||||
{
|
{
|
||||||
return do_argstrip(self, BOTHSTRIP, chars);
|
return do_argstrip(self, BOTHSTRIP, chars);
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,23 +189,27 @@ PyDoc_STRVAR(builtin_divmod__doc__,
|
||||||
"Return the tuple (x//y, x%y). Invariant: div*y + mod == x.");
|
"Return the tuple (x//y, x%y). Invariant: div*y + mod == x.");
|
||||||
|
|
||||||
#define BUILTIN_DIVMOD_METHODDEF \
|
#define BUILTIN_DIVMOD_METHODDEF \
|
||||||
{"divmod", (PyCFunction)builtin_divmod, METH_VARARGS, builtin_divmod__doc__},
|
{"divmod", (PyCFunction)builtin_divmod, METH_FASTCALL, builtin_divmod__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
|
builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_divmod(PyObject *module, PyObject *args)
|
builtin_divmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *x;
|
PyObject *x;
|
||||||
PyObject *y;
|
PyObject *y;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "divmod",
|
if (!_PyArg_UnpackStack(args, nargs, "divmod",
|
||||||
2, 2,
|
2, 2,
|
||||||
&x, &y)) {
|
&x, &y)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("divmod", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_divmod_impl(module, x, y);
|
return_value = builtin_divmod_impl(module, x, y);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -225,25 +229,29 @@ PyDoc_STRVAR(builtin_eval__doc__,
|
||||||
"If only globals is given, locals defaults to it.");
|
"If only globals is given, locals defaults to it.");
|
||||||
|
|
||||||
#define BUILTIN_EVAL_METHODDEF \
|
#define BUILTIN_EVAL_METHODDEF \
|
||||||
{"eval", (PyCFunction)builtin_eval, METH_VARARGS, builtin_eval__doc__},
|
{"eval", (PyCFunction)builtin_eval, METH_FASTCALL, builtin_eval__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
|
builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
|
||||||
PyObject *locals);
|
PyObject *locals);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_eval(PyObject *module, PyObject *args)
|
builtin_eval(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *source;
|
PyObject *source;
|
||||||
PyObject *globals = Py_None;
|
PyObject *globals = Py_None;
|
||||||
PyObject *locals = Py_None;
|
PyObject *locals = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "eval",
|
if (!_PyArg_UnpackStack(args, nargs, "eval",
|
||||||
1, 3,
|
1, 3,
|
||||||
&source, &globals, &locals)) {
|
&source, &globals, &locals)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("eval", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_eval_impl(module, source, globals, locals);
|
return_value = builtin_eval_impl(module, source, globals, locals);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -263,25 +271,29 @@ PyDoc_STRVAR(builtin_exec__doc__,
|
||||||
"If only globals is given, locals defaults to it.");
|
"If only globals is given, locals defaults to it.");
|
||||||
|
|
||||||
#define BUILTIN_EXEC_METHODDEF \
|
#define BUILTIN_EXEC_METHODDEF \
|
||||||
{"exec", (PyCFunction)builtin_exec, METH_VARARGS, builtin_exec__doc__},
|
{"exec", (PyCFunction)builtin_exec, METH_FASTCALL, builtin_exec__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
|
builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
|
||||||
PyObject *locals);
|
PyObject *locals);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_exec(PyObject *module, PyObject *args)
|
builtin_exec(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *source;
|
PyObject *source;
|
||||||
PyObject *globals = Py_None;
|
PyObject *globals = Py_None;
|
||||||
PyObject *locals = Py_None;
|
PyObject *locals = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "exec",
|
if (!_PyArg_UnpackStack(args, nargs, "exec",
|
||||||
1, 3,
|
1, 3,
|
||||||
&source, &globals, &locals)) {
|
&source, &globals, &locals)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("exec", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_exec_impl(module, source, globals, locals);
|
return_value = builtin_exec_impl(module, source, globals, locals);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -318,23 +330,27 @@ PyDoc_STRVAR(builtin_hasattr__doc__,
|
||||||
"This is done by calling getattr(obj, name) and catching AttributeError.");
|
"This is done by calling getattr(obj, name) and catching AttributeError.");
|
||||||
|
|
||||||
#define BUILTIN_HASATTR_METHODDEF \
|
#define BUILTIN_HASATTR_METHODDEF \
|
||||||
{"hasattr", (PyCFunction)builtin_hasattr, METH_VARARGS, builtin_hasattr__doc__},
|
{"hasattr", (PyCFunction)builtin_hasattr, METH_FASTCALL, builtin_hasattr__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
|
builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_hasattr(PyObject *module, PyObject *args)
|
builtin_hasattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "hasattr",
|
if (!_PyArg_UnpackStack(args, nargs, "hasattr",
|
||||||
2, 2,
|
2, 2,
|
||||||
&obj, &name)) {
|
&obj, &name)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("hasattr", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_hasattr_impl(module, obj, name);
|
return_value = builtin_hasattr_impl(module, obj, name);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -362,25 +378,29 @@ PyDoc_STRVAR(builtin_setattr__doc__,
|
||||||
"setattr(x, \'y\', v) is equivalent to ``x.y = v\'\'");
|
"setattr(x, \'y\', v) is equivalent to ``x.y = v\'\'");
|
||||||
|
|
||||||
#define BUILTIN_SETATTR_METHODDEF \
|
#define BUILTIN_SETATTR_METHODDEF \
|
||||||
{"setattr", (PyCFunction)builtin_setattr, METH_VARARGS, builtin_setattr__doc__},
|
{"setattr", (PyCFunction)builtin_setattr, METH_FASTCALL, builtin_setattr__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
|
builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
|
||||||
PyObject *value);
|
PyObject *value);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_setattr(PyObject *module, PyObject *args)
|
builtin_setattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "setattr",
|
if (!_PyArg_UnpackStack(args, nargs, "setattr",
|
||||||
3, 3,
|
3, 3,
|
||||||
&obj, &name, &value)) {
|
&obj, &name, &value)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("setattr", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_setattr_impl(module, obj, name, value);
|
return_value = builtin_setattr_impl(module, obj, name, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -396,23 +416,27 @@ PyDoc_STRVAR(builtin_delattr__doc__,
|
||||||
"delattr(x, \'y\') is equivalent to ``del x.y\'\'");
|
"delattr(x, \'y\') is equivalent to ``del x.y\'\'");
|
||||||
|
|
||||||
#define BUILTIN_DELATTR_METHODDEF \
|
#define BUILTIN_DELATTR_METHODDEF \
|
||||||
{"delattr", (PyCFunction)builtin_delattr, METH_VARARGS, builtin_delattr__doc__},
|
{"delattr", (PyCFunction)builtin_delattr, METH_FASTCALL, builtin_delattr__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
|
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_delattr(PyObject *module, PyObject *args)
|
builtin_delattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "delattr",
|
if (!_PyArg_UnpackStack(args, nargs, "delattr",
|
||||||
2, 2,
|
2, 2,
|
||||||
&obj, &name)) {
|
&obj, &name)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("delattr", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_delattr_impl(module, obj, name);
|
return_value = builtin_delattr_impl(module, obj, name);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -505,24 +529,28 @@ PyDoc_STRVAR(builtin_pow__doc__,
|
||||||
"invoked using the three argument form.");
|
"invoked using the three argument form.");
|
||||||
|
|
||||||
#define BUILTIN_POW_METHODDEF \
|
#define BUILTIN_POW_METHODDEF \
|
||||||
{"pow", (PyCFunction)builtin_pow, METH_VARARGS, builtin_pow__doc__},
|
{"pow", (PyCFunction)builtin_pow, METH_FASTCALL, builtin_pow__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
|
builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_pow(PyObject *module, PyObject *args)
|
builtin_pow(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *x;
|
PyObject *x;
|
||||||
PyObject *y;
|
PyObject *y;
|
||||||
PyObject *z = Py_None;
|
PyObject *z = Py_None;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "pow",
|
if (!_PyArg_UnpackStack(args, nargs, "pow",
|
||||||
2, 3,
|
2, 3,
|
||||||
&x, &y, &z)) {
|
&x, &y, &z)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("pow", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_pow_impl(module, x, y, z);
|
return_value = builtin_pow_impl(module, x, y, z);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -542,22 +570,26 @@ PyDoc_STRVAR(builtin_input__doc__,
|
||||||
"On *nix systems, readline is used if available.");
|
"On *nix systems, readline is used if available.");
|
||||||
|
|
||||||
#define BUILTIN_INPUT_METHODDEF \
|
#define BUILTIN_INPUT_METHODDEF \
|
||||||
{"input", (PyCFunction)builtin_input, METH_VARARGS, builtin_input__doc__},
|
{"input", (PyCFunction)builtin_input, METH_FASTCALL, builtin_input__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_input_impl(PyObject *module, PyObject *prompt);
|
builtin_input_impl(PyObject *module, PyObject *prompt);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_input(PyObject *module, PyObject *args)
|
builtin_input(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *prompt = NULL;
|
PyObject *prompt = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "input",
|
if (!_PyArg_UnpackStack(args, nargs, "input",
|
||||||
0, 1,
|
0, 1,
|
||||||
&prompt)) {
|
&prompt)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("input", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_input_impl(module, prompt);
|
return_value = builtin_input_impl(module, prompt);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -586,23 +618,27 @@ PyDoc_STRVAR(builtin_sum__doc__,
|
||||||
"reject non-numeric types.");
|
"reject non-numeric types.");
|
||||||
|
|
||||||
#define BUILTIN_SUM_METHODDEF \
|
#define BUILTIN_SUM_METHODDEF \
|
||||||
{"sum", (PyCFunction)builtin_sum, METH_VARARGS, builtin_sum__doc__},
|
{"sum", (PyCFunction)builtin_sum, METH_FASTCALL, builtin_sum__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
|
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_sum(PyObject *module, PyObject *args)
|
builtin_sum(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *iterable;
|
PyObject *iterable;
|
||||||
PyObject *start = NULL;
|
PyObject *start = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "sum",
|
if (!_PyArg_UnpackStack(args, nargs, "sum",
|
||||||
1, 2,
|
1, 2,
|
||||||
&iterable, &start)) {
|
&iterable, &start)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("sum", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_sum_impl(module, iterable, start);
|
return_value = builtin_sum_impl(module, iterable, start);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -620,24 +656,28 @@ PyDoc_STRVAR(builtin_isinstance__doc__,
|
||||||
"or ...`` etc.");
|
"or ...`` etc.");
|
||||||
|
|
||||||
#define BUILTIN_ISINSTANCE_METHODDEF \
|
#define BUILTIN_ISINSTANCE_METHODDEF \
|
||||||
{"isinstance", (PyCFunction)builtin_isinstance, METH_VARARGS, builtin_isinstance__doc__},
|
{"isinstance", (PyCFunction)builtin_isinstance, METH_FASTCALL, builtin_isinstance__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_isinstance_impl(PyObject *module, PyObject *obj,
|
builtin_isinstance_impl(PyObject *module, PyObject *obj,
|
||||||
PyObject *class_or_tuple);
|
PyObject *class_or_tuple);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_isinstance(PyObject *module, PyObject *args)
|
builtin_isinstance(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *class_or_tuple;
|
PyObject *class_or_tuple;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "isinstance",
|
if (!_PyArg_UnpackStack(args, nargs, "isinstance",
|
||||||
2, 2,
|
2, 2,
|
||||||
&obj, &class_or_tuple)) {
|
&obj, &class_or_tuple)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("isinstance", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_isinstance_impl(module, obj, class_or_tuple);
|
return_value = builtin_isinstance_impl(module, obj, class_or_tuple);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -655,27 +695,31 @@ PyDoc_STRVAR(builtin_issubclass__doc__,
|
||||||
"or ...`` etc.");
|
"or ...`` etc.");
|
||||||
|
|
||||||
#define BUILTIN_ISSUBCLASS_METHODDEF \
|
#define BUILTIN_ISSUBCLASS_METHODDEF \
|
||||||
{"issubclass", (PyCFunction)builtin_issubclass, METH_VARARGS, builtin_issubclass__doc__},
|
{"issubclass", (PyCFunction)builtin_issubclass, METH_FASTCALL, builtin_issubclass__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_issubclass_impl(PyObject *module, PyObject *cls,
|
builtin_issubclass_impl(PyObject *module, PyObject *cls,
|
||||||
PyObject *class_or_tuple);
|
PyObject *class_or_tuple);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
builtin_issubclass(PyObject *module, PyObject *args)
|
builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *cls;
|
PyObject *cls;
|
||||||
PyObject *class_or_tuple;
|
PyObject *class_or_tuple;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "issubclass",
|
if (!_PyArg_UnpackStack(args, nargs, "issubclass",
|
||||||
2, 2,
|
2, 2,
|
||||||
&cls, &class_or_tuple)) {
|
&cls, &class_or_tuple)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("issubclass", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = builtin_issubclass_impl(module, cls, class_or_tuple);
|
return_value = builtin_issubclass_impl(module, cls, class_or_tuple);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=66818a69d6d23181 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=3234725ef4d8bbf1 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -273,23 +273,27 @@ PyDoc_STRVAR(_imp_create_dynamic__doc__,
|
||||||
"Create an extension module.");
|
"Create an extension module.");
|
||||||
|
|
||||||
#define _IMP_CREATE_DYNAMIC_METHODDEF \
|
#define _IMP_CREATE_DYNAMIC_METHODDEF \
|
||||||
{"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_VARARGS, _imp_create_dynamic__doc__},
|
{"create_dynamic", (PyCFunction)_imp_create_dynamic, METH_FASTCALL, _imp_create_dynamic__doc__},
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file);
|
_imp_create_dynamic_impl(PyObject *module, PyObject *spec, PyObject *file);
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
_imp_create_dynamic(PyObject *module, PyObject *args)
|
_imp_create_dynamic(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
|
||||||
{
|
{
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *spec;
|
PyObject *spec;
|
||||||
PyObject *file = NULL;
|
PyObject *file = NULL;
|
||||||
|
|
||||||
if (!PyArg_UnpackTuple(args, "create_dynamic",
|
if (!_PyArg_UnpackStack(args, nargs, "create_dynamic",
|
||||||
1, 2,
|
1, 2,
|
||||||
&spec, &file)) {
|
&spec, &file)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_PyArg_NoStackKeywords("create_dynamic", kwnames)) {
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
return_value = _imp_create_dynamic_impl(module, spec, file);
|
return_value = _imp_create_dynamic_impl(module, spec, file);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -365,4 +369,4 @@ exit:
|
||||||
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
|
#ifndef _IMP_EXEC_DYNAMIC_METHODDEF
|
||||||
#define _IMP_EXEC_DYNAMIC_METHODDEF
|
#define _IMP_EXEC_DYNAMIC_METHODDEF
|
||||||
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
|
#endif /* !defined(_IMP_EXEC_DYNAMIC_METHODDEF) */
|
||||||
/*[clinic end generated code: output=5a3f012344950548 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=c1d0e65d04114958 input=a9049054013a1b77]*/
|
||||||
|
|
Loading…
Reference in New Issue