mirror of https://github.com/python/cpython
bpo-35582: Argument Clinic: Optimize the "all boring objects" case. (GH-11520)
Use _PyArg_CheckPositional() and inlined code instead of PyArg_UnpackTuple() and _PyArg_UnpackStack() if all parameters are positional and use the "object" converter.
This commit is contained in:
parent
4fa9591025
commit
2a39d251f0
|
@ -106,11 +106,15 @@ test_objects_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b = NULL;
|
PyObject *b = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "test_objects_converter",
|
if (!_PyArg_CheckPositional("test_objects_converter", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
b = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = test_objects_converter_impl(module, a, b);
|
return_value = test_objects_converter_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -119,7 +123,7 @@ exit:
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
|
test_objects_converter_impl(PyObject *module, PyObject *a, PyObject *b)
|
||||||
/*[clinic end generated code: output=068c25d6ae8cd1ef input=4cbb3d9edd2a36f3]*/
|
/*[clinic end generated code: output=58009c0e42b4834e input=4cbb3d9edd2a36f3]*/
|
||||||
|
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
test_object_converter_subclass_of
|
test_object_converter_subclass_of
|
||||||
|
|
|
@ -389,11 +389,14 @@ _io__Buffered_truncate(buffered *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *pos = Py_None;
|
PyObject *pos = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&pos)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
pos = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _io__Buffered_truncate_impl(self, pos);
|
return_value = _io__Buffered_truncate_impl(self, pos);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -591,4 +594,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=a85f61f495feff5c input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=b7f51040defff318 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -282,11 +282,14 @@ _io_BytesIO_readlines(bytesio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *arg = Py_None;
|
PyObject *arg = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "readlines",
|
if (!_PyArg_CheckPositional("readlines", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&arg)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
arg = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _io_BytesIO_readlines_impl(self, arg);
|
return_value = _io_BytesIO_readlines_impl(self, arg);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -503,4 +506,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=5c68eb481fa960bf input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=a6b47dd7921abfcd input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -368,11 +368,14 @@ _io_FileIO_truncate(fileio *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *posobj = NULL;
|
PyObject *posobj = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&posobj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
posobj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _io_FileIO_truncate_impl(self, posobj);
|
return_value = _io_FileIO_truncate_impl(self, posobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -402,4 +405,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=4cf4e5f0cd656b11 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=b6f327457938d4dd input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -419,11 +419,14 @@ _io_TextIOWrapper_truncate(textio *self, PyObject *const *args, Py_ssize_t nargs
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *pos = Py_None;
|
PyObject *pos = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "truncate",
|
if (!_PyArg_CheckPositional("truncate", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&pos)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
pos = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
return_value = _io_TextIOWrapper_truncate_impl(self, pos);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -548,4 +551,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=8bdd1035bf878d6f input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=c3d1b2a5d2d2d429 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -296,11 +296,14 @@ _multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, Py
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizeobj = Py_None;
|
PyObject *sizeobj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "read",
|
if (!_PyArg_CheckPositional("read", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&sizeobj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
sizeobj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
|
return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -325,11 +328,14 @@ _multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizeobj = Py_None;
|
PyObject *sizeobj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "readline",
|
if (!_PyArg_CheckPositional("readline", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&sizeobj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
sizeobj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
|
return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -354,11 +360,14 @@ _multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *sel
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *sizehintobj = Py_None;
|
PyObject *sizehintobj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "readlines",
|
if (!_PyArg_CheckPositional("readlines", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&sizehintobj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
sizehintobj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
|
return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -422,4 +431,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=2ed7030b28a79029 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=bcd6311010557faf input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -65,11 +65,11 @@ _abc__abc_register(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
PyObject *subclass;
|
PyObject *subclass;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_abc_register",
|
if (!_PyArg_CheckPositional("_abc_register", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&self, &subclass)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
self = args[0];
|
||||||
|
subclass = args[1];
|
||||||
return_value = _abc__abc_register_impl(module, self, subclass);
|
return_value = _abc__abc_register_impl(module, self, subclass);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -96,11 +96,11 @@ _abc__abc_instancecheck(PyObject *module, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
PyObject *instance;
|
PyObject *instance;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_abc_instancecheck",
|
if (!_PyArg_CheckPositional("_abc_instancecheck", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&self, &instance)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
self = args[0];
|
||||||
|
instance = args[1];
|
||||||
return_value = _abc__abc_instancecheck_impl(module, self, instance);
|
return_value = _abc__abc_instancecheck_impl(module, self, instance);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -127,11 +127,11 @@ _abc__abc_subclasscheck(PyObject *module, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *self;
|
PyObject *self;
|
||||||
PyObject *subclass;
|
PyObject *subclass;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_abc_subclasscheck",
|
if (!_PyArg_CheckPositional("_abc_subclasscheck", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&self, &subclass)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
self = args[0];
|
||||||
|
subclass = args[1];
|
||||||
return_value = _abc__abc_subclasscheck_impl(module, self, subclass);
|
return_value = _abc__abc_subclasscheck_impl(module, self, subclass);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -159,4 +159,4 @@ _abc_get_cache_token(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return _abc_get_cache_token_impl(module);
|
return _abc_get_cache_token_impl(module);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=606db3cb658d9240 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=2544b4b5ae50a089 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -468,11 +468,42 @@ _curses_window_border(PyCursesWindowObject *self, PyObject *const *args, Py_ssiz
|
||||||
PyObject *bl = NULL;
|
PyObject *bl = NULL;
|
||||||
PyObject *br = NULL;
|
PyObject *br = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "border",
|
if (!_PyArg_CheckPositional("border", nargs, 0, 8)) {
|
||||||
0, 8,
|
|
||||||
&ls, &rs, &ts, &bs, &tl, &tr, &bl, &br)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
ls = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
rs = args[1];
|
||||||
|
if (nargs < 3) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
ts = args[2];
|
||||||
|
if (nargs < 4) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bs = args[3];
|
||||||
|
if (nargs < 5) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
tl = args[4];
|
||||||
|
if (nargs < 6) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
tr = args[5];
|
||||||
|
if (nargs < 7) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bl = args[6];
|
||||||
|
if (nargs < 8) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
br = args[7];
|
||||||
|
skip_optional:
|
||||||
return_value = _curses_window_border_impl(self, ls, rs, ts, bs, tl, tr, bl, br);
|
return_value = _curses_window_border_impl(self, ls, rs, ts, bs, tl, tr, bl, br);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -4500,4 +4531,4 @@ _curses_use_default_colors(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||||
#ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF
|
#ifndef _CURSES_USE_DEFAULT_COLORS_METHODDEF
|
||||||
#define _CURSES_USE_DEFAULT_COLORS_METHODDEF
|
#define _CURSES_USE_DEFAULT_COLORS_METHODDEF
|
||||||
#endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */
|
#endif /* !defined(_CURSES_USE_DEFAULT_COLORS_METHODDEF) */
|
||||||
/*[clinic end generated code: output=ceb2e32ee1370033 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=5305982cb312a911 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -504,11 +504,11 @@ _elementtree_Element_makeelement(ElementObject *self, PyObject *const *args, Py_
|
||||||
PyObject *tag;
|
PyObject *tag;
|
||||||
PyObject *attrib;
|
PyObject *attrib;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "makeelement",
|
if (!_PyArg_CheckPositional("makeelement", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&tag, &attrib)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
tag = args[0];
|
||||||
|
attrib = args[1];
|
||||||
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
|
return_value = _elementtree_Element_makeelement_impl(self, tag, attrib);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -562,11 +562,11 @@ _elementtree_Element_set(ElementObject *self, PyObject *const *args, Py_ssize_t
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "set",
|
if (!_PyArg_CheckPositional("set", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&key, &value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
value = args[1];
|
||||||
return_value = _elementtree_Element_set_impl(self, key, value);
|
return_value = _elementtree_Element_set_impl(self, key, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -647,11 +647,15 @@ _elementtree_TreeBuilder_start(TreeBuilderObject *self, PyObject *const *args, P
|
||||||
PyObject *tag;
|
PyObject *tag;
|
||||||
PyObject *attrs = Py_None;
|
PyObject *attrs = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "start",
|
if (!_PyArg_CheckPositional("start", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&tag, &attrs)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
tag = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
attrs = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
|
return_value = _elementtree_TreeBuilder_start_impl(self, tag, attrs);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -734,14 +738,18 @@ _elementtree_XMLParser__setevents(XMLParserObject *self, PyObject *const *args,
|
||||||
PyObject *events_queue;
|
PyObject *events_queue;
|
||||||
PyObject *events_to_report = Py_None;
|
PyObject *events_to_report = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_setevents",
|
if (!_PyArg_CheckPositional("_setevents", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&events_queue, &events_to_report)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
events_queue = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
events_to_report = args[1];
|
||||||
|
skip_optional:
|
||||||
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=6bbedd24b709dc00 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=0c15c41e03a7829f input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -21,11 +21,15 @@ _gdbm_gdbm_get(dbmobject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "get",
|
if (!_PyArg_CheckPositional("get", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&key, &default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = _gdbm_gdbm_get_impl(self, key, default_value);
|
return_value = _gdbm_gdbm_get_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -52,11 +56,15 @@ _gdbm_gdbm_setdefault(dbmobject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "setdefault",
|
if (!_PyArg_CheckPositional("setdefault", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&key, &default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
|
return_value = _gdbm_gdbm_setdefault_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -290,4 +298,4 @@ skip_optional:
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=05f06065d2dc1f9e input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=0a72598e5a3acd60 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -21,11 +21,11 @@ _heapq_heappush(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *heap;
|
PyObject *heap;
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "heappush",
|
if (!_PyArg_CheckPositional("heappush", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&heap, &item)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
heap = args[0];
|
||||||
|
item = args[1];
|
||||||
return_value = _heapq_heappush_impl(module, heap, item);
|
return_value = _heapq_heappush_impl(module, heap, item);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -68,11 +68,11 @@ _heapq_heapreplace(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *heap;
|
PyObject *heap;
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "heapreplace",
|
if (!_PyArg_CheckPositional("heapreplace", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&heap, &item)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
heap = args[0];
|
||||||
|
item = args[1];
|
||||||
return_value = _heapq_heapreplace_impl(module, heap, item);
|
return_value = _heapq_heapreplace_impl(module, heap, item);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -101,11 +101,11 @@ _heapq_heappushpop(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *heap;
|
PyObject *heap;
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "heappushpop",
|
if (!_PyArg_CheckPositional("heappushpop", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&heap, &item)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
heap = args[0];
|
||||||
|
item = args[1];
|
||||||
return_value = _heapq_heappushpop_impl(module, heap, item);
|
return_value = _heapq_heappushpop_impl(module, heap, item);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -150,11 +150,11 @@ _heapq__heapreplace_max(PyObject *module, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *heap;
|
PyObject *heap;
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_heapreplace_max",
|
if (!_PyArg_CheckPositional("_heapreplace_max", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&heap, &item)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
heap = args[0];
|
||||||
|
item = args[1];
|
||||||
return_value = _heapq__heapreplace_max_impl(module, heap, item);
|
return_value = _heapq__heapreplace_max_impl(module, heap, item);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -169,4 +169,4 @@ PyDoc_STRVAR(_heapq__heapify_max__doc__,
|
||||||
|
|
||||||
#define _HEAPQ__HEAPIFY_MAX_METHODDEF \
|
#define _HEAPQ__HEAPIFY_MAX_METHODDEF \
|
||||||
{"_heapify_max", (PyCFunction)_heapq__heapify_max, METH_O, _heapq__heapify_max__doc__},
|
{"_heapify_max", (PyCFunction)_heapq__heapify_max, METH_O, _heapq__heapify_max__doc__},
|
||||||
/*[clinic end generated code: output=b73e874eeb9977b6 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=37ef2a3319971c8d input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -49,11 +49,11 @@ _operator_add(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "add",
|
if (!_PyArg_CheckPositional("add", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_add_impl(module, a, b);
|
return_value = _operator_add_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -79,11 +79,11 @@ _operator_sub(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "sub",
|
if (!_PyArg_CheckPositional("sub", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_sub_impl(module, a, b);
|
return_value = _operator_sub_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -109,11 +109,11 @@ _operator_mul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "mul",
|
if (!_PyArg_CheckPositional("mul", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_mul_impl(module, a, b);
|
return_value = _operator_mul_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -139,11 +139,11 @@ _operator_matmul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "matmul",
|
if (!_PyArg_CheckPositional("matmul", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_matmul_impl(module, a, b);
|
return_value = _operator_matmul_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -169,11 +169,11 @@ _operator_floordiv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "floordiv",
|
if (!_PyArg_CheckPositional("floordiv", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_floordiv_impl(module, a, b);
|
return_value = _operator_floordiv_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -199,11 +199,11 @@ _operator_truediv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "truediv",
|
if (!_PyArg_CheckPositional("truediv", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_truediv_impl(module, a, b);
|
return_value = _operator_truediv_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -229,11 +229,11 @@ _operator_mod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "mod",
|
if (!_PyArg_CheckPositional("mod", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_mod_impl(module, a, b);
|
return_value = _operator_mod_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -304,11 +304,11 @@ _operator_lshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "lshift",
|
if (!_PyArg_CheckPositional("lshift", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_lshift_impl(module, a, b);
|
return_value = _operator_lshift_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -334,11 +334,11 @@ _operator_rshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "rshift",
|
if (!_PyArg_CheckPositional("rshift", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_rshift_impl(module, a, b);
|
return_value = _operator_rshift_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -392,11 +392,11 @@ _operator_and_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "and_",
|
if (!_PyArg_CheckPositional("and_", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_and__impl(module, a, b);
|
return_value = _operator_and__impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -422,11 +422,11 @@ _operator_xor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "xor",
|
if (!_PyArg_CheckPositional("xor", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_xor_impl(module, a, b);
|
return_value = _operator_xor_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -452,11 +452,11 @@ _operator_or_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "or_",
|
if (!_PyArg_CheckPositional("or_", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_or__impl(module, a, b);
|
return_value = _operator_or__impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -482,11 +482,11 @@ _operator_iadd(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "iadd",
|
if (!_PyArg_CheckPositional("iadd", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_iadd_impl(module, a, b);
|
return_value = _operator_iadd_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -512,11 +512,11 @@ _operator_isub(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "isub",
|
if (!_PyArg_CheckPositional("isub", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_isub_impl(module, a, b);
|
return_value = _operator_isub_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -542,11 +542,11 @@ _operator_imul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "imul",
|
if (!_PyArg_CheckPositional("imul", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_imul_impl(module, a, b);
|
return_value = _operator_imul_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -572,11 +572,11 @@ _operator_imatmul(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "imatmul",
|
if (!_PyArg_CheckPositional("imatmul", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_imatmul_impl(module, a, b);
|
return_value = _operator_imatmul_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -602,11 +602,11 @@ _operator_ifloordiv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ifloordiv",
|
if (!_PyArg_CheckPositional("ifloordiv", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ifloordiv_impl(module, a, b);
|
return_value = _operator_ifloordiv_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -632,11 +632,11 @@ _operator_itruediv(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "itruediv",
|
if (!_PyArg_CheckPositional("itruediv", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_itruediv_impl(module, a, b);
|
return_value = _operator_itruediv_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -662,11 +662,11 @@ _operator_imod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "imod",
|
if (!_PyArg_CheckPositional("imod", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_imod_impl(module, a, b);
|
return_value = _operator_imod_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -692,11 +692,11 @@ _operator_ilshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ilshift",
|
if (!_PyArg_CheckPositional("ilshift", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ilshift_impl(module, a, b);
|
return_value = _operator_ilshift_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -722,11 +722,11 @@ _operator_irshift(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "irshift",
|
if (!_PyArg_CheckPositional("irshift", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_irshift_impl(module, a, b);
|
return_value = _operator_irshift_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -752,11 +752,11 @@ _operator_iand(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "iand",
|
if (!_PyArg_CheckPositional("iand", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_iand_impl(module, a, b);
|
return_value = _operator_iand_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -782,11 +782,11 @@ _operator_ixor(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ixor",
|
if (!_PyArg_CheckPositional("ixor", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ixor_impl(module, a, b);
|
return_value = _operator_ixor_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -812,11 +812,11 @@ _operator_ior(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ior",
|
if (!_PyArg_CheckPositional("ior", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ior_impl(module, a, b);
|
return_value = _operator_ior_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -842,11 +842,11 @@ _operator_concat(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "concat",
|
if (!_PyArg_CheckPositional("concat", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_concat_impl(module, a, b);
|
return_value = _operator_concat_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -872,11 +872,11 @@ _operator_iconcat(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "iconcat",
|
if (!_PyArg_CheckPositional("iconcat", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_iconcat_impl(module, a, b);
|
return_value = _operator_iconcat_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -903,11 +903,11 @@ _operator_contains(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
int _return_value;
|
int _return_value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "contains",
|
if (!_PyArg_CheckPositional("contains", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
_return_value = _operator_contains_impl(module, a, b);
|
_return_value = _operator_contains_impl(module, a, b);
|
||||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -938,11 +938,11 @@ _operator_indexOf(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "indexOf",
|
if (!_PyArg_CheckPositional("indexOf", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
_return_value = _operator_indexOf_impl(module, a, b);
|
_return_value = _operator_indexOf_impl(module, a, b);
|
||||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -973,11 +973,11 @@ _operator_countOf(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "countOf",
|
if (!_PyArg_CheckPositional("countOf", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
_return_value = _operator_countOf_impl(module, a, b);
|
_return_value = _operator_countOf_impl(module, a, b);
|
||||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -1007,11 +1007,11 @@ _operator_getitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "getitem",
|
if (!_PyArg_CheckPositional("getitem", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_getitem_impl(module, a, b);
|
return_value = _operator_getitem_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1039,11 +1039,12 @@ _operator_setitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
PyObject *c;
|
PyObject *c;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "setitem",
|
if (!_PyArg_CheckPositional("setitem", nargs, 3, 3)) {
|
||||||
3, 3,
|
|
||||||
&a, &b, &c)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
|
c = args[2];
|
||||||
return_value = _operator_setitem_impl(module, a, b, c);
|
return_value = _operator_setitem_impl(module, a, b, c);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1069,11 +1070,11 @@ _operator_delitem(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "delitem",
|
if (!_PyArg_CheckPositional("delitem", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_delitem_impl(module, a, b);
|
return_value = _operator_delitem_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1099,11 +1100,11 @@ _operator_eq(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "eq",
|
if (!_PyArg_CheckPositional("eq", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_eq_impl(module, a, b);
|
return_value = _operator_eq_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1129,11 +1130,11 @@ _operator_ne(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ne",
|
if (!_PyArg_CheckPositional("ne", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ne_impl(module, a, b);
|
return_value = _operator_ne_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1159,11 +1160,11 @@ _operator_lt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "lt",
|
if (!_PyArg_CheckPositional("lt", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_lt_impl(module, a, b);
|
return_value = _operator_lt_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1189,11 +1190,11 @@ _operator_le(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "le",
|
if (!_PyArg_CheckPositional("le", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_le_impl(module, a, b);
|
return_value = _operator_le_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1219,11 +1220,11 @@ _operator_gt(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "gt",
|
if (!_PyArg_CheckPositional("gt", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_gt_impl(module, a, b);
|
return_value = _operator_gt_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1249,11 +1250,11 @@ _operator_ge(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ge",
|
if (!_PyArg_CheckPositional("ge", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ge_impl(module, a, b);
|
return_value = _operator_ge_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1279,11 +1280,11 @@ _operator_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "pow",
|
if (!_PyArg_CheckPositional("pow", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_pow_impl(module, a, b);
|
return_value = _operator_pow_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1309,11 +1310,11 @@ _operator_ipow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "ipow",
|
if (!_PyArg_CheckPositional("ipow", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_ipow_impl(module, a, b);
|
return_value = _operator_ipow_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1348,11 +1349,11 @@ _operator_is_(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "is_",
|
if (!_PyArg_CheckPositional("is_", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_is__impl(module, a, b);
|
return_value = _operator_is__impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1378,11 +1379,11 @@ _operator_is_not(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "is_not",
|
if (!_PyArg_CheckPositional("is_not", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator_is_not_impl(module, a, b);
|
return_value = _operator_is_not_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1480,14 +1481,14 @@ _operator__compare_digest(PyObject *module, PyObject *const *args, Py_ssize_t na
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "_compare_digest",
|
if (!_PyArg_CheckPositional("_compare_digest", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = _operator__compare_digest_impl(module, a, b);
|
return_value = _operator__compare_digest_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=b382bece80a5a254 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=e7ed71a8c475a901 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -213,11 +213,11 @@ _pickle_Unpickler_find_class(UnpicklerObject *self, PyObject *const *args, Py_ss
|
||||||
PyObject *module_name;
|
PyObject *module_name;
|
||||||
PyObject *global_name;
|
PyObject *global_name;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "find_class",
|
if (!_PyArg_CheckPositional("find_class", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&module_name, &global_name)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
module_name = args[0];
|
||||||
|
global_name = args[1];
|
||||||
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:
|
||||||
|
@ -562,4 +562,4 @@ _pickle_loads(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=4b32d63ff58b64d8 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=225f06abcf27ed2b input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -653,11 +653,14 @@ _sre_SRE_Match_start(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "start",
|
if (!_PyArg_CheckPositional("start", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&group)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
group = args[0];
|
||||||
|
skip_optional:
|
||||||
_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;
|
||||||
|
@ -687,11 +690,14 @@ _sre_SRE_Match_end(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
Py_ssize_t _return_value;
|
Py_ssize_t _return_value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "end",
|
if (!_PyArg_CheckPositional("end", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&group)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
group = args[0];
|
||||||
|
skip_optional:
|
||||||
_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;
|
||||||
|
@ -720,11 +726,14 @@ _sre_SRE_Match_span(MatchObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *group = NULL;
|
PyObject *group = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "span",
|
if (!_PyArg_CheckPositional("span", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&group)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
group = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _sre_SRE_Match_span_impl(self, group);
|
return_value = _sre_SRE_Match_span_impl(self, group);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -789,4 +798,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=7992634045212b26 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=8d19359d6a4a3a7e input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -124,11 +124,10 @@ itertools__tee(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("_tee", kwargs)) {
|
!_PyArg_NoKeywords("_tee", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "_tee",
|
if (!_PyArg_CheckPositional("_tee", PyTuple_GET_SIZE(args), 1, 1)) {
|
||||||
1, 1,
|
|
||||||
&iterable)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
iterable = PyTuple_GET_ITEM(args, 0);
|
||||||
return_value = itertools__tee_impl(type, iterable);
|
return_value = itertools__tee_impl(type, iterable);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -204,11 +203,10 @@ itertools_cycle(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("cycle", kwargs)) {
|
!_PyArg_NoKeywords("cycle", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "cycle",
|
if (!_PyArg_CheckPositional("cycle", PyTuple_GET_SIZE(args), 1, 1)) {
|
||||||
1, 1,
|
|
||||||
&iterable)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
iterable = PyTuple_GET_ITEM(args, 0);
|
||||||
return_value = itertools_cycle_impl(type, iterable);
|
return_value = itertools_cycle_impl(type, iterable);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -237,11 +235,11 @@ itertools_dropwhile(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("dropwhile", kwargs)) {
|
!_PyArg_NoKeywords("dropwhile", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "dropwhile",
|
if (!_PyArg_CheckPositional("dropwhile", PyTuple_GET_SIZE(args), 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&func, &seq)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
func = PyTuple_GET_ITEM(args, 0);
|
||||||
|
seq = PyTuple_GET_ITEM(args, 1);
|
||||||
return_value = itertools_dropwhile_impl(type, func, seq);
|
return_value = itertools_dropwhile_impl(type, func, seq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -268,11 +266,11 @@ itertools_takewhile(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("takewhile", kwargs)) {
|
!_PyArg_NoKeywords("takewhile", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "takewhile",
|
if (!_PyArg_CheckPositional("takewhile", PyTuple_GET_SIZE(args), 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&func, &seq)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
func = PyTuple_GET_ITEM(args, 0);
|
||||||
|
seq = PyTuple_GET_ITEM(args, 1);
|
||||||
return_value = itertools_takewhile_impl(type, func, seq);
|
return_value = itertools_takewhile_impl(type, func, seq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -299,11 +297,11 @@ itertools_starmap(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("starmap", kwargs)) {
|
!_PyArg_NoKeywords("starmap", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "starmap",
|
if (!_PyArg_CheckPositional("starmap", PyTuple_GET_SIZE(args), 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&func, &seq)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
func = PyTuple_GET_ITEM(args, 0);
|
||||||
|
seq = PyTuple_GET_ITEM(args, 1);
|
||||||
return_value = itertools_starmap_impl(type, func, seq);
|
return_value = itertools_starmap_impl(type, func, seq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -496,11 +494,11 @@ itertools_filterfalse(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("filterfalse", kwargs)) {
|
!_PyArg_NoKeywords("filterfalse", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "filterfalse",
|
if (!_PyArg_CheckPositional("filterfalse", PyTuple_GET_SIZE(args), 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&func, &seq)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
func = PyTuple_GET_ITEM(args, 0);
|
||||||
|
seq = PyTuple_GET_ITEM(args, 1);
|
||||||
return_value = itertools_filterfalse_impl(type, func, seq);
|
return_value = itertools_filterfalse_impl(type, func, seq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -542,4 +540,4 @@ itertools_count(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=f289354f54e04c13 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=3d0ca69707b60715 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -21,11 +21,11 @@ math_gcd(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *a;
|
PyObject *a;
|
||||||
PyObject *b;
|
PyObject *b;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "gcd",
|
if (!_PyArg_CheckPositional("gcd", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&a, &b)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
a = args[0];
|
||||||
|
b = args[1];
|
||||||
return_value = math_gcd_impl(module, a, b);
|
return_value = math_gcd_impl(module, a, b);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -307,11 +307,11 @@ math_dist(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *p;
|
PyObject *p;
|
||||||
PyObject *q;
|
PyObject *q;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "dist",
|
if (!_PyArg_CheckPositional("dist", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&p, &q)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
p = args[0];
|
||||||
|
q = args[1];
|
||||||
return_value = math_dist_impl(module, p, q);
|
return_value = math_dist_impl(module, p, q);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -548,4 +548,4 @@ math_isclose(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=2fe4fecd85585313 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=f3264ab0ef57ba0a input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -45,11 +45,17 @@ select_select(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *xlist;
|
PyObject *xlist;
|
||||||
PyObject *timeout_obj = Py_None;
|
PyObject *timeout_obj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "select",
|
if (!_PyArg_CheckPositional("select", nargs, 3, 4)) {
|
||||||
3, 4,
|
|
||||||
&rlist, &wlist, &xlist, &timeout_obj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
rlist = args[0];
|
||||||
|
wlist = args[1];
|
||||||
|
xlist = args[2];
|
||||||
|
if (nargs < 4) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
timeout_obj = args[3];
|
||||||
|
skip_optional:
|
||||||
return_value = select_select_impl(module, rlist, wlist, xlist, timeout_obj);
|
return_value = select_select_impl(module, rlist, wlist, xlist, timeout_obj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -201,11 +207,14 @@ select_poll_poll(pollObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *timeout_obj = Py_None;
|
PyObject *timeout_obj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "poll",
|
if (!_PyArg_CheckPositional("poll", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&timeout_obj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
timeout_obj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = select_poll_poll_impl(self, timeout_obj);
|
return_value = select_poll_poll_impl(self, timeout_obj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -366,11 +375,14 @@ select_devpoll_poll(devpollObject *self, PyObject *const *args, Py_ssize_t nargs
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *timeout_obj = Py_None;
|
PyObject *timeout_obj = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "poll",
|
if (!_PyArg_CheckPositional("poll", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&timeout_obj)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
timeout_obj = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = select_devpoll_poll_impl(self, timeout_obj);
|
return_value = select_devpoll_poll_impl(self, timeout_obj);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -808,11 +820,22 @@ select_epoll___exit__(pyEpoll_Object *self, PyObject *const *args, Py_ssize_t na
|
||||||
PyObject *exc_value = Py_None;
|
PyObject *exc_value = Py_None;
|
||||||
PyObject *exc_tb = Py_None;
|
PyObject *exc_tb = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "__exit__",
|
if (!_PyArg_CheckPositional("__exit__", nargs, 0, 3)) {
|
||||||
0, 3,
|
|
||||||
&exc_type, &exc_value, &exc_tb)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
exc_type = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
exc_value = args[1];
|
||||||
|
if (nargs < 3) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
exc_tb = args[2];
|
||||||
|
skip_optional:
|
||||||
return_value = select_epoll___exit___impl(self, exc_type, exc_value, exc_tb);
|
return_value = select_epoll___exit___impl(self, exc_type, exc_value, exc_tb);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1105,4 +1128,4 @@ exit:
|
||||||
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF
|
#ifndef SELECT_KQUEUE_CONTROL_METHODDEF
|
||||||
#define SELECT_KQUEUE_CONTROL_METHODDEF
|
#define SELECT_KQUEUE_CONTROL_METHODDEF
|
||||||
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
|
#endif /* !defined(SELECT_KQUEUE_CONTROL_METHODDEF) */
|
||||||
/*[clinic end generated code: output=20da8f9c050e1b65 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=3e40b33a3294d03d input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -545,11 +545,14 @@ bytearray_strip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t nargs
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
if (!_PyArg_CheckPositional("strip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytearray_strip_impl(self, bytes);
|
return_value = bytearray_strip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -576,11 +579,14 @@ bytearray_lstrip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
if (!_PyArg_CheckPositional("lstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytearray_lstrip_impl(self, bytes);
|
return_value = bytearray_lstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -607,11 +613,14 @@ bytearray_rstrip(PyByteArrayObject *self, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
if (!_PyArg_CheckPositional("rstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytearray_rstrip_impl(self, bytes);
|
return_value = bytearray_rstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -815,4 +824,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return bytearray_sizeof_impl(self);
|
return bytearray_sizeof_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=010e281b823d7df1 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=f4353c27dcb4a13d input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -203,11 +203,14 @@ bytes_strip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
if (!_PyArg_CheckPositional("strip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytes_strip_impl(self, bytes);
|
return_value = bytes_strip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -234,11 +237,14 @@ bytes_lstrip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
if (!_PyArg_CheckPositional("lstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytes_lstrip_impl(self, bytes);
|
return_value = bytes_lstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -265,11 +271,14 @@ bytes_rstrip(PyBytesObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *bytes = Py_None;
|
PyObject *bytes = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
if (!_PyArg_CheckPositional("rstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&bytes)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
bytes = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = bytes_rstrip_impl(self, bytes);
|
return_value = bytes_rstrip_impl(self, bytes);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -559,4 +568,4 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=810c8dfc72520ca4 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=c6621bda84e63e51 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -21,11 +21,15 @@ dict_fromkeys(PyTypeObject *type, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *iterable;
|
PyObject *iterable;
|
||||||
PyObject *value = Py_None;
|
PyObject *value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "fromkeys",
|
if (!_PyArg_CheckPositional("fromkeys", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&iterable, &value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
iterable = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = dict_fromkeys_impl(type, iterable, value);
|
return_value = dict_fromkeys_impl(type, iterable, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -60,11 +64,15 @@ dict_get(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "get",
|
if (!_PyArg_CheckPositional("get", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&key, &default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = dict_get_impl(self, key, default_value);
|
return_value = dict_get_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -93,11 +101,15 @@ dict_setdefault(PyDictObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "setdefault",
|
if (!_PyArg_CheckPositional("setdefault", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&key, &default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = dict_setdefault_impl(self, key, default_value);
|
return_value = dict_setdefault_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -121,4 +133,4 @@ dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return dict___reversed___impl(self);
|
return dict___reversed___impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=193e08cb8099fe22 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=12c21ce3552d9617 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -58,14 +58,13 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("reversed", kwargs)) {
|
!_PyArg_NoKeywords("reversed", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "reversed",
|
if (!_PyArg_CheckPositional("reversed", PyTuple_GET_SIZE(args), 1, 1)) {
|
||||||
1, 1,
|
|
||||||
&seq)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
seq = PyTuple_GET_ITEM(args, 0);
|
||||||
return_value = reversed_new_impl(type, seq);
|
return_value = reversed_new_impl(type, seq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=9008c36999c57218 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=831cec3db0e987c9 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -58,11 +58,14 @@ float___round__(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *o_ndigits = NULL;
|
PyObject *o_ndigits = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "__round__",
|
if (!_PyArg_CheckPositional("__round__", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&o_ndigits)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
o_ndigits = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = float___round___impl(self, o_ndigits);
|
return_value = float___round___impl(self, o_ndigits);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -173,11 +176,14 @@ float_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("float", kwargs)) {
|
!_PyArg_NoKeywords("float", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "float",
|
if (!_PyArg_CheckPositional("float", PyTuple_GET_SIZE(args), 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&x)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (PyTuple_GET_SIZE(args) < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
x = PyTuple_GET_ITEM(args, 0);
|
||||||
|
skip_optional:
|
||||||
return_value = float_new_impl(type, x);
|
return_value = float_new_impl(type, x);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -345,4 +351,4 @@ float___format__(PyObject *self, PyObject *arg)
|
||||||
exit:
|
exit:
|
||||||
return return_value;
|
return return_value;
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=2631a60701a8f7d4 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=c183029d87dd41fa input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -289,11 +289,14 @@ list___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("list", kwargs)) {
|
!_PyArg_NoKeywords("list", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "list",
|
if (!_PyArg_CheckPositional("list", PyTuple_GET_SIZE(args), 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&iterable)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (PyTuple_GET_SIZE(args) < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
iterable = PyTuple_GET_ITEM(args, 0);
|
||||||
|
skip_optional:
|
||||||
return_value = list___init___impl((PyListObject *)self, iterable);
|
return_value = list___init___impl((PyListObject *)self, iterable);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -335,4 +338,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return list___reversed___impl(self);
|
return list___reversed___impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=1f641f5aef3f886f input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=4a835f9880a72273 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -81,11 +81,14 @@ tuple_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
||||||
!_PyArg_NoKeywords("tuple", kwargs)) {
|
!_PyArg_NoKeywords("tuple", kwargs)) {
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
if (!PyArg_UnpackTuple(args, "tuple",
|
if (!_PyArg_CheckPositional("tuple", PyTuple_GET_SIZE(args), 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&iterable)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (PyTuple_GET_SIZE(args) < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
iterable = PyTuple_GET_ITEM(args, 0);
|
||||||
|
skip_optional:
|
||||||
return_value = tuple_new_impl(type, iterable);
|
return_value = tuple_new_impl(type, iterable);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -108,4 +111,4 @@ tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return tuple___getnewargs___impl(self);
|
return tuple___getnewargs___impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=5312868473a41cfe input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=56fab9b7368aba49 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -546,11 +546,14 @@ unicode_strip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = Py_None;
|
PyObject *chars = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "strip",
|
if (!_PyArg_CheckPositional("strip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&chars)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
chars = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = unicode_strip_impl(self, chars);
|
return_value = unicode_strip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -577,11 +580,14 @@ unicode_lstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = NULL;
|
PyObject *chars = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "lstrip",
|
if (!_PyArg_CheckPositional("lstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&chars)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
chars = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = unicode_lstrip_impl(self, chars);
|
return_value = unicode_lstrip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -608,11 +614,14 @@ unicode_rstrip(PyObject *self, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *chars = NULL;
|
PyObject *chars = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "rstrip",
|
if (!_PyArg_CheckPositional("rstrip", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&chars)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
chars = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = unicode_rstrip_impl(self, chars);
|
return_value = unicode_rstrip_impl(self, chars);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1098,4 +1107,4 @@ unicode_sizeof(PyObject *self, PyObject *Py_UNUSED(ignored))
|
||||||
{
|
{
|
||||||
return unicode_sizeof_impl(self);
|
return unicode_sizeof_impl(self);
|
||||||
}
|
}
|
||||||
/*[clinic end generated code: output=73ad9670e00a2490 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=087ff163a10505ae input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -217,11 +217,11 @@ builtin_divmod(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *x;
|
PyObject *x;
|
||||||
PyObject *y;
|
PyObject *y;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "divmod",
|
if (!_PyArg_CheckPositional("divmod", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&x, &y)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
x = args[0];
|
||||||
|
y = args[1];
|
||||||
return_value = builtin_divmod_impl(module, x, y);
|
return_value = builtin_divmod_impl(module, x, y);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -255,11 +255,19 @@ builtin_eval(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *globals = Py_None;
|
PyObject *globals = Py_None;
|
||||||
PyObject *locals = Py_None;
|
PyObject *locals = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "eval",
|
if (!_PyArg_CheckPositional("eval", nargs, 1, 3)) {
|
||||||
1, 3,
|
|
||||||
&source, &globals, &locals)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
source = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
globals = args[1];
|
||||||
|
if (nargs < 3) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
locals = args[2];
|
||||||
|
skip_optional:
|
||||||
return_value = builtin_eval_impl(module, source, globals, locals);
|
return_value = builtin_eval_impl(module, source, globals, locals);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -293,11 +301,19 @@ builtin_exec(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *globals = Py_None;
|
PyObject *globals = Py_None;
|
||||||
PyObject *locals = Py_None;
|
PyObject *locals = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "exec",
|
if (!_PyArg_CheckPositional("exec", nargs, 1, 3)) {
|
||||||
1, 3,
|
|
||||||
&source, &globals, &locals)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
source = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
globals = args[1];
|
||||||
|
if (nargs < 3) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
locals = args[2];
|
||||||
|
skip_optional:
|
||||||
return_value = builtin_exec_impl(module, source, globals, locals);
|
return_value = builtin_exec_impl(module, source, globals, locals);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -346,11 +362,11 @@ builtin_hasattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "hasattr",
|
if (!_PyArg_CheckPositional("hasattr", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&obj, &name)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
obj = args[0];
|
||||||
|
name = args[1];
|
||||||
return_value = builtin_hasattr_impl(module, obj, name);
|
return_value = builtin_hasattr_impl(module, obj, name);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -392,11 +408,12 @@ builtin_setattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "setattr",
|
if (!_PyArg_CheckPositional("setattr", nargs, 3, 3)) {
|
||||||
3, 3,
|
|
||||||
&obj, &name, &value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
obj = args[0];
|
||||||
|
name = args[1];
|
||||||
|
value = args[2];
|
||||||
return_value = builtin_setattr_impl(module, obj, name, value);
|
return_value = builtin_setattr_impl(module, obj, name, value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -424,11 +441,11 @@ builtin_delattr(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *name;
|
PyObject *name;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "delattr",
|
if (!_PyArg_CheckPositional("delattr", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&obj, &name)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
obj = args[0];
|
||||||
|
name = args[1];
|
||||||
return_value = builtin_delattr_impl(module, obj, name);
|
return_value = builtin_delattr_impl(module, obj, name);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -534,11 +551,16 @@ builtin_pow(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *y;
|
PyObject *y;
|
||||||
PyObject *z = Py_None;
|
PyObject *z = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "pow",
|
if (!_PyArg_CheckPositional("pow", nargs, 2, 3)) {
|
||||||
2, 3,
|
|
||||||
&x, &y, &z)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
x = args[0];
|
||||||
|
y = args[1];
|
||||||
|
if (nargs < 3) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
z = args[2];
|
||||||
|
skip_optional:
|
||||||
return_value = builtin_pow_impl(module, x, y, z);
|
return_value = builtin_pow_impl(module, x, y, z);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -569,11 +591,14 @@ builtin_input(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *prompt = NULL;
|
PyObject *prompt = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "input",
|
if (!_PyArg_CheckPositional("input", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&prompt)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
prompt = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = builtin_input_impl(module, prompt);
|
return_value = builtin_input_impl(module, prompt);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -684,11 +709,11 @@ builtin_isinstance(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *obj;
|
PyObject *obj;
|
||||||
PyObject *class_or_tuple;
|
PyObject *class_or_tuple;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "isinstance",
|
if (!_PyArg_CheckPositional("isinstance", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&obj, &class_or_tuple)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
obj = args[0];
|
||||||
|
class_or_tuple = args[1];
|
||||||
return_value = builtin_isinstance_impl(module, obj, class_or_tuple);
|
return_value = builtin_isinstance_impl(module, obj, class_or_tuple);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -719,14 +744,14 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *cls;
|
PyObject *cls;
|
||||||
PyObject *class_or_tuple;
|
PyObject *class_or_tuple;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "issubclass",
|
if (!_PyArg_CheckPositional("issubclass", nargs, 2, 2)) {
|
||||||
2, 2,
|
|
||||||
&cls, &class_or_tuple)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
cls = args[0];
|
||||||
|
class_or_tuple = args[1];
|
||||||
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=11b5cd918bd7eb18 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=54e5e33dcc2659e0 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -25,11 +25,15 @@ _contextvars_Context_get(PyContext *self, PyObject *const *args, Py_ssize_t narg
|
||||||
PyObject *key;
|
PyObject *key;
|
||||||
PyObject *default_value = Py_None;
|
PyObject *default_value = Py_None;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "get",
|
if (!_PyArg_CheckPositional("get", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&key, &default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
key = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = _contextvars_Context_get_impl(self, key, default_value);
|
return_value = _contextvars_Context_get_impl(self, key, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -134,11 +138,14 @@ _contextvars_ContextVar_get(PyContextVar *self, PyObject *const *args, Py_ssize_
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *default_value = NULL;
|
PyObject *default_value = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "get",
|
if (!_PyArg_CheckPositional("get", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&default_value)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
default_value = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = _contextvars_ContextVar_get_impl(self, default_value);
|
return_value = _contextvars_ContextVar_get_impl(self, default_value);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -170,4 +177,4 @@ PyDoc_STRVAR(_contextvars_ContextVar_reset__doc__,
|
||||||
|
|
||||||
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
|
#define _CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF \
|
||||||
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
|
{"reset", (PyCFunction)_contextvars_ContextVar_reset, METH_O, _contextvars_ContextVar_reset__doc__},
|
||||||
/*[clinic end generated code: output=9c93e22bcadbaa2b input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=67c3a8f76b6cf4e7 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -318,11 +318,15 @@ _imp_create_dynamic(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *spec;
|
PyObject *spec;
|
||||||
PyObject *file = NULL;
|
PyObject *file = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "create_dynamic",
|
if (!_PyArg_CheckPositional("create_dynamic", nargs, 1, 2)) {
|
||||||
1, 2,
|
|
||||||
&spec, &file)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
spec = args[0];
|
||||||
|
if (nargs < 2) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
file = args[1];
|
||||||
|
skip_optional:
|
||||||
return_value = _imp_create_dynamic_impl(module, spec, file);
|
return_value = _imp_create_dynamic_impl(module, spec, file);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -433,4 +437,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=22062cee6e8ba7f3 input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=2409b8feeafe7c4b input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -32,11 +32,12 @@ sys_excepthook(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
PyObject *traceback;
|
PyObject *traceback;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "excepthook",
|
if (!_PyArg_CheckPositional("excepthook", nargs, 3, 3)) {
|
||||||
3, 3,
|
|
||||||
&exctype, &value, &traceback)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
exctype = args[0];
|
||||||
|
value = args[1];
|
||||||
|
traceback = args[2];
|
||||||
return_value = sys_excepthook_impl(module, exctype, value, traceback);
|
return_value = sys_excepthook_impl(module, exctype, value, traceback);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -87,11 +88,14 @@ sys_exit(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
|
||||||
PyObject *return_value = NULL;
|
PyObject *return_value = NULL;
|
||||||
PyObject *status = NULL;
|
PyObject *status = NULL;
|
||||||
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "exit",
|
if (!_PyArg_CheckPositional("exit", nargs, 0, 1)) {
|
||||||
0, 1,
|
|
||||||
&status)) {
|
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
if (nargs < 1) {
|
||||||
|
goto skip_optional;
|
||||||
|
}
|
||||||
|
status = args[0];
|
||||||
|
skip_optional:
|
||||||
return_value = sys_exit_impl(module, status);
|
return_value = sys_exit_impl(module, status);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -1046,4 +1050,4 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||||
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
|
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||||
#define SYS_GETANDROIDAPILEVEL_METHODDEF
|
#define SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||||
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
|
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
|
||||||
/*[clinic end generated code: output=6a5202e5bfe5e6bd input=a9049054013a1b77]*/
|
/*[clinic end generated code: output=109787af3401cd27 input=a9049054013a1b77]*/
|
||||||
|
|
|
@ -643,18 +643,6 @@ class CLanguage(Language):
|
||||||
f.return_converter.type == 'PyObject *')
|
f.return_converter.type == 'PyObject *')
|
||||||
|
|
||||||
positional = parameters and parameters[-1].is_positional_only()
|
positional = parameters and parameters[-1].is_positional_only()
|
||||||
all_boring_objects = False # yes, this will be false if there are 0 parameters, it's fine
|
|
||||||
first_optional = len(parameters)
|
|
||||||
for i, p in enumerate(parameters):
|
|
||||||
c = p.converter
|
|
||||||
if type(c) != object_converter:
|
|
||||||
break
|
|
||||||
if c.format_unit != 'O':
|
|
||||||
break
|
|
||||||
if p.default is not unspecified:
|
|
||||||
first_optional = min(first_optional, i)
|
|
||||||
else:
|
|
||||||
all_boring_objects = True
|
|
||||||
|
|
||||||
new_or_init = f.kind in (METHOD_NEW, METHOD_INIT)
|
new_or_init = f.kind in (METHOD_NEW, METHOD_INIT)
|
||||||
|
|
||||||
|
@ -827,34 +815,6 @@ class CLanguage(Language):
|
||||||
|
|
||||||
parser_definition = parser_body(parser_prototype, ' {option_group_parsing}')
|
parser_definition = parser_body(parser_prototype, ' {option_group_parsing}')
|
||||||
|
|
||||||
elif positional and all_boring_objects:
|
|
||||||
# positional-only, but no option groups,
|
|
||||||
# and nothing but normal objects:
|
|
||||||
# PyArg_UnpackTuple!
|
|
||||||
|
|
||||||
if not new_or_init:
|
|
||||||
flags = "METH_FASTCALL"
|
|
||||||
parser_prototype = parser_prototype_fastcall
|
|
||||||
|
|
||||||
parser_definition = parser_body(parser_prototype, normalize_snippet("""
|
|
||||||
if (!_PyArg_UnpackStack(args, nargs, "{name}",
|
|
||||||
{unpack_min}, {unpack_max},
|
|
||||||
{parse_arguments})) {{
|
|
||||||
goto exit;
|
|
||||||
}}
|
|
||||||
""", indent=4))
|
|
||||||
else:
|
|
||||||
flags = "METH_VARARGS"
|
|
||||||
parser_prototype = parser_prototype_varargs
|
|
||||||
|
|
||||||
parser_definition = parser_body(parser_prototype, normalize_snippet("""
|
|
||||||
if (!PyArg_UnpackTuple(args, "{name}",
|
|
||||||
{unpack_min}, {unpack_max},
|
|
||||||
{parse_arguments})) {{
|
|
||||||
goto exit;
|
|
||||||
}}
|
|
||||||
""", indent=4))
|
|
||||||
|
|
||||||
elif positional:
|
elif positional:
|
||||||
if not new_or_init:
|
if not new_or_init:
|
||||||
# positional-only, but no option groups
|
# positional-only, but no option groups
|
||||||
|
|
Loading…
Reference in New Issue