mirror of https://github.com/python/cpython
Issue #24007: Argument Clinic now writes the format of PyArg_Parse*() at the
same line as function name.
This commit is contained in:
parent
a30e2256f7
commit
247789cee9
|
@ -148,8 +148,7 @@ _io_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
int closefd = 1;
|
||||
PyObject *opener = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|sizzziO:open", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|sizzziO:open", _keywords,
|
||||
&file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener))
|
||||
goto exit;
|
||||
return_value = _io_open_impl(module, file, mode, buffering, encoding, errors, newline, closefd, opener);
|
||||
|
@ -157,4 +156,4 @@ _io_open(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=c51a5a443c11f02b input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=97cdc09bf68a8064 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -19,9 +19,7 @@ _io__BufferedIOBase_readinto(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto", &buffer))
|
||||
goto exit;
|
||||
return_value = _io__BufferedIOBase_readinto_impl(self, &buffer);
|
||||
|
||||
|
@ -50,9 +48,7 @@ _io__BufferedIOBase_readinto1(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto1",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
|
||||
goto exit;
|
||||
return_value = _io__BufferedIOBase_readinto1_impl(self, &buffer);
|
||||
|
||||
|
@ -102,8 +98,7 @@ _io__Buffered_peek(buffered *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|n:peek",
|
||||
if (!PyArg_ParseTuple(args, "|n:peek",
|
||||
&size))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_peek_impl(self, size);
|
||||
|
@ -129,8 +124,7 @@ _io__Buffered_read(buffered *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:read",
|
||||
if (!PyArg_ParseTuple(args, "|O&:read",
|
||||
_PyIO_ConvertSsize_t, &n))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_read_impl(self, n);
|
||||
|
@ -156,9 +150,7 @@ _io__Buffered_read1(buffered *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"n:read1",
|
||||
&n))
|
||||
if (!PyArg_Parse(arg, "n:read1", &n))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_read1_impl(self, n);
|
||||
|
||||
|
@ -183,9 +175,7 @@ _io__Buffered_readinto(buffered *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto", &buffer))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_readinto_impl(self, &buffer);
|
||||
|
||||
|
@ -214,9 +204,7 @@ _io__Buffered_readinto1(buffered *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto1",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto1", &buffer))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_readinto1_impl(self, &buffer);
|
||||
|
||||
|
@ -245,8 +233,7 @@ _io__Buffered_readline(buffered *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:readline",
|
||||
if (!PyArg_ParseTuple(args, "|O&:readline",
|
||||
_PyIO_ConvertSsize_t, &size))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_readline_impl(self, size);
|
||||
|
@ -273,8 +260,7 @@ _io__Buffered_seek(buffered *self, PyObject *args)
|
|||
PyObject *targetobj;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|i:seek",
|
||||
if (!PyArg_ParseTuple(args, "O|i:seek",
|
||||
&targetobj, &whence))
|
||||
goto exit;
|
||||
return_value = _io__Buffered_seek_impl(self, targetobj, whence);
|
||||
|
@ -328,8 +314,7 @@ _io_BufferedReader___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *raw;
|
||||
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|n:BufferedReader", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedReader", _keywords,
|
||||
&raw, &buffer_size))
|
||||
goto exit;
|
||||
return_value = _io_BufferedReader___init___impl((buffered *)self, raw, buffer_size);
|
||||
|
@ -360,8 +345,7 @@ _io_BufferedWriter___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *raw;
|
||||
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|n:BufferedWriter", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedWriter", _keywords,
|
||||
&raw, &buffer_size))
|
||||
goto exit;
|
||||
return_value = _io_BufferedWriter___init___impl((buffered *)self, raw, buffer_size);
|
||||
|
@ -387,9 +371,7 @@ _io_BufferedWriter_write(buffered *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:write",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "y*:write", &buffer))
|
||||
goto exit;
|
||||
return_value = _io_BufferedWriter_write_impl(self, &buffer);
|
||||
|
||||
|
@ -430,8 +412,7 @@ _io_BufferedRWPair___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
if ((Py_TYPE(self) == &PyBufferedRWPair_Type) &&
|
||||
!_PyArg_NoKeywords("BufferedRWPair", kwargs))
|
||||
goto exit;
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"OO|n:BufferedRWPair",
|
||||
if (!PyArg_ParseTuple(args, "OO|n:BufferedRWPair",
|
||||
&reader, &writer, &buffer_size))
|
||||
goto exit;
|
||||
return_value = _io_BufferedRWPair___init___impl((rwpair *)self, reader, writer, buffer_size);
|
||||
|
@ -462,8 +443,7 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *raw;
|
||||
Py_ssize_t buffer_size = DEFAULT_BUFFER_SIZE;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|n:BufferedRandom", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|n:BufferedRandom", _keywords,
|
||||
&raw, &buffer_size))
|
||||
goto exit;
|
||||
return_value = _io_BufferedRandom___init___impl((buffered *)self, raw, buffer_size);
|
||||
|
@ -471,4 +451,4 @@ _io_BufferedRandom___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=78808e39f36e3fa9 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=2bbb5e239b4ffe6f input=a9049054013a1b77]*/
|
||||
|
|
|
@ -276,9 +276,7 @@ _io_BytesIO_readinto(bytesio *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto", &buffer))
|
||||
goto exit;
|
||||
return_value = _io_BytesIO_readinto_impl(self, &buffer);
|
||||
|
||||
|
@ -346,8 +344,7 @@ _io_BytesIO_seek(bytesio *self, PyObject *args)
|
|||
Py_ssize_t pos;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"n|i:seek",
|
||||
if (!PyArg_ParseTuple(args, "n|i:seek",
|
||||
&pos, &whence))
|
||||
goto exit;
|
||||
return_value = _io_BytesIO_seek_impl(self, pos, whence);
|
||||
|
@ -414,8 +411,7 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"initial_bytes", NULL};
|
||||
PyObject *initvalue = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:BytesIO", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:BytesIO", _keywords,
|
||||
&initvalue))
|
||||
goto exit;
|
||||
return_value = _io_BytesIO___init___impl((bytesio *)self, initvalue);
|
||||
|
@ -423,4 +419,4 @@ _io_BytesIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=e22697ada514f4eb input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=500ccc149587fac4 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -55,8 +55,7 @@ _io_FileIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
int closefd = 1;
|
||||
PyObject *opener = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|siO:FileIO", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|siO:FileIO", _keywords,
|
||||
&nameobj, &mode, &closefd, &opener))
|
||||
goto exit;
|
||||
return_value = _io_FileIO___init___impl((fileio *)self, nameobj, mode, closefd, opener);
|
||||
|
@ -155,9 +154,7 @@ _io_FileIO_readinto(fileio *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"w*:readinto",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "w*:readinto", &buffer))
|
||||
goto exit;
|
||||
return_value = _io_FileIO_readinto_impl(self, &buffer);
|
||||
|
||||
|
@ -212,8 +209,7 @@ _io_FileIO_read(fileio *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:read",
|
||||
if (!PyArg_ParseTuple(args, "|O&:read",
|
||||
_PyIO_ConvertSsize_t, &size))
|
||||
goto exit;
|
||||
return_value = _io_FileIO_read_impl(self, size);
|
||||
|
@ -244,9 +240,7 @@ _io_FileIO_write(fileio *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer b = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:write",
|
||||
&b))
|
||||
if (!PyArg_Parse(arg, "y*:write", &b))
|
||||
goto exit;
|
||||
return_value = _io_FileIO_write_impl(self, &b);
|
||||
|
||||
|
@ -285,8 +279,7 @@ _io_FileIO_seek(fileio *self, PyObject *args)
|
|||
PyObject *pos;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|i:seek",
|
||||
if (!PyArg_ParseTuple(args, "O|i:seek",
|
||||
&pos, &whence))
|
||||
goto exit;
|
||||
return_value = _io_FileIO_seek_impl(self, pos, whence);
|
||||
|
@ -371,4 +364,4 @@ _io_FileIO_isatty(fileio *self, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#define _IO_FILEIO_TRUNCATE_METHODDEF
|
||||
#endif /* !defined(_IO_FILEIO_TRUNCATE_METHODDEF) */
|
||||
/*[clinic end generated code: output=c6708e1980f6e02d input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=b1a20b10c81add64 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -185,8 +185,7 @@ _io__IOBase_readline(PyObject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t limit = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:readline",
|
||||
if (!PyArg_ParseTuple(args, "|O&:readline",
|
||||
_PyIO_ConvertSsize_t, &limit))
|
||||
goto exit;
|
||||
return_value = _io__IOBase_readline_impl(self, limit);
|
||||
|
@ -217,8 +216,7 @@ _io__IOBase_readlines(PyObject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t hint = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:readlines",
|
||||
if (!PyArg_ParseTuple(args, "|O&:readlines",
|
||||
_PyIO_ConvertSsize_t, &hint))
|
||||
goto exit;
|
||||
return_value = _io__IOBase_readlines_impl(self, hint);
|
||||
|
@ -252,8 +250,7 @@ _io__RawIOBase_read(PyObject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|n:read",
|
||||
if (!PyArg_ParseTuple(args, "|n:read",
|
||||
&n))
|
||||
goto exit;
|
||||
return_value = _io__RawIOBase_read_impl(self, n);
|
||||
|
@ -279,4 +276,4 @@ _io__RawIOBase_readall(PyObject *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return _io__RawIOBase_readall_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=84eef4b7541f54b7 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=fe034152b6884e65 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -156,8 +156,7 @@ _io_StringIO_seek(stringio *self, PyObject *args)
|
|||
Py_ssize_t pos;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"n|i:seek",
|
||||
if (!PyArg_ParseTuple(args, "n|i:seek",
|
||||
&pos, &whence))
|
||||
goto exit;
|
||||
return_value = _io_StringIO_seek_impl(self, pos, whence);
|
||||
|
@ -222,8 +221,7 @@ _io_StringIO___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *value = NULL;
|
||||
PyObject *newline_obj = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|OO:StringIO", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:StringIO", _keywords,
|
||||
&value, &newline_obj))
|
||||
goto exit;
|
||||
return_value = _io_StringIO___init___impl((stringio *)self, value, newline_obj);
|
||||
|
@ -285,4 +283,4 @@ _io_StringIO_seekable(stringio *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return _io_StringIO_seekable_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=f3062096d357c652 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=f061cf3a20cd14ed input=a9049054013a1b77]*/
|
||||
|
|
|
@ -29,8 +29,7 @@ _io_IncrementalNewlineDecoder___init__(PyObject *self, PyObject *args, PyObject
|
|||
int translate;
|
||||
PyObject *errors = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"Oi|O:IncrementalNewlineDecoder", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|O:IncrementalNewlineDecoder", _keywords,
|
||||
&decoder, &translate, &errors))
|
||||
goto exit;
|
||||
return_value = _io_IncrementalNewlineDecoder___init___impl((nldecoder_object *)self, decoder, translate, errors);
|
||||
|
@ -59,8 +58,7 @@ _io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *args, PyO
|
|||
PyObject *input;
|
||||
int final = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|i:decode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:decode", _keywords,
|
||||
&input, &final))
|
||||
goto exit;
|
||||
return_value = _io_IncrementalNewlineDecoder_decode_impl(self, input, final);
|
||||
|
@ -163,8 +161,7 @@ _io_TextIOWrapper___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
int line_buffering = 0;
|
||||
int write_through = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|zzzii:TextIOWrapper", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|zzzii:TextIOWrapper", _keywords,
|
||||
&buffer, &encoding, &errors, &newline, &line_buffering, &write_through))
|
||||
goto exit;
|
||||
return_value = _io_TextIOWrapper___init___impl((textio *)self, buffer, encoding, errors, newline, line_buffering, write_through);
|
||||
|
@ -207,9 +204,7 @@ _io_TextIOWrapper_write(textio *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *text;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:write",
|
||||
&text))
|
||||
if (!PyArg_Parse(arg, "U:write", &text))
|
||||
goto exit;
|
||||
return_value = _io_TextIOWrapper_write_impl(self, text);
|
||||
|
||||
|
@ -234,8 +229,7 @@ _io_TextIOWrapper_read(textio *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t n = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:read",
|
||||
if (!PyArg_ParseTuple(args, "|O&:read",
|
||||
_PyIO_ConvertSsize_t, &n))
|
||||
goto exit;
|
||||
return_value = _io_TextIOWrapper_read_impl(self, n);
|
||||
|
@ -261,8 +255,7 @@ _io_TextIOWrapper_readline(textio *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t size = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|n:readline",
|
||||
if (!PyArg_ParseTuple(args, "|n:readline",
|
||||
&size))
|
||||
goto exit;
|
||||
return_value = _io_TextIOWrapper_readline_impl(self, size);
|
||||
|
@ -289,8 +282,7 @@ _io_TextIOWrapper_seek(textio *self, PyObject *args)
|
|||
PyObject *cookieObj;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|i:seek",
|
||||
if (!PyArg_ParseTuple(args, "O|i:seek",
|
||||
&cookieObj, &whence))
|
||||
goto exit;
|
||||
return_value = _io_TextIOWrapper_seek_impl(self, cookieObj, whence);
|
||||
|
@ -461,4 +453,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return _io_TextIOWrapper_close_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=a610bd3b694886c3 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=690608f85aab8ba5 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -29,8 +29,7 @@ _multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *args
|
|||
PyObject *input;
|
||||
const char *errors = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|z:encode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|z:encode", _keywords,
|
||||
&input, &errors))
|
||||
goto exit;
|
||||
return_value = _multibytecodec_MultibyteCodec_encode_impl(self, input, errors);
|
||||
|
@ -66,8 +65,7 @@ _multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *args
|
|||
Py_buffer input = {NULL, NULL};
|
||||
const char *errors = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"y*|z:decode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|z:decode", _keywords,
|
||||
&input, &errors))
|
||||
goto exit;
|
||||
return_value = _multibytecodec_MultibyteCodec_decode_impl(self, &input, errors);
|
||||
|
@ -101,8 +99,7 @@ _multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderOb
|
|||
PyObject *input;
|
||||
int final = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|i:encode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|i:encode", _keywords,
|
||||
&input, &final))
|
||||
goto exit;
|
||||
return_value = _multibytecodec_MultibyteIncrementalEncoder_encode_impl(self, input, final);
|
||||
|
@ -149,8 +146,7 @@ _multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderOb
|
|||
Py_buffer input = {NULL, NULL};
|
||||
int final = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"y*|i:decode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|i:decode", _keywords,
|
||||
&input, &final))
|
||||
goto exit;
|
||||
return_value = _multibytecodec_MultibyteIncrementalDecoder_decode_impl(self, &input, final);
|
||||
|
@ -321,4 +317,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
|
|||
|
||||
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
|
||||
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
|
||||
/*[clinic end generated code: output=0fe582cb941024c1 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=c104f5fd548c1ac5 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -25,9 +25,7 @@ _bz2_BZ2Compressor_compress(BZ2Compressor *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:compress",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:compress", &data))
|
||||
goto exit;
|
||||
return_value = _bz2_BZ2Compressor_compress_impl(self, &data);
|
||||
|
||||
|
@ -84,8 +82,7 @@ _bz2_BZ2Compressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
if ((Py_TYPE(self) == &BZ2Compressor_Type) &&
|
||||
!_PyArg_NoKeywords("BZ2Compressor", kwargs))
|
||||
goto exit;
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|i:BZ2Compressor",
|
||||
if (!PyArg_ParseTuple(args, "|i:BZ2Compressor",
|
||||
&compresslevel))
|
||||
goto exit;
|
||||
return_value = _bz2_BZ2Compressor___init___impl((BZ2Compressor *)self, compresslevel);
|
||||
|
@ -128,8 +125,7 @@ _bz2_BZ2Decompressor_decompress(BZ2Decompressor *self, PyObject *args, PyObject
|
|||
Py_buffer data = {NULL, NULL};
|
||||
Py_ssize_t max_length = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"y*|n:decompress", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords,
|
||||
&data, &max_length))
|
||||
goto exit;
|
||||
return_value = _bz2_BZ2Decompressor_decompress_impl(self, &data, max_length);
|
||||
|
@ -169,4 +165,4 @@ _bz2_BZ2Decompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=e8a48a949969c355 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=fef29b76b3314fc7 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -20,13 +20,11 @@ _codecs__forget_codec(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
const char *encoding;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"s:_forget_codec",
|
||||
&encoding))
|
||||
if (!PyArg_Parse(arg, "s:_forget_codec", &encoding))
|
||||
goto exit;
|
||||
return_value = _codecs__forget_codec_impl(module, encoding);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=fc5ce4d3166f7d96 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=52cc017e06c8ef9a input=a9049054013a1b77]*/
|
||||
|
|
|
@ -26,8 +26,7 @@ crypt_crypt(PyModuleDef *module, PyObject *args)
|
|||
const char *word;
|
||||
const char *salt;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"ss:crypt",
|
||||
if (!PyArg_ParseTuple(args, "ss:crypt",
|
||||
&word, &salt))
|
||||
goto exit;
|
||||
return_value = crypt_crypt_impl(module, word, salt);
|
||||
|
@ -35,4 +34,4 @@ crypt_crypt(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=b5b8d977189d19ea input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=22c295c9bce018c4 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -26,8 +26,7 @@ datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"tz", NULL};
|
||||
PyObject *tz = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:now", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:now", _keywords,
|
||||
&tz))
|
||||
goto exit;
|
||||
return_value = datetime_datetime_now_impl(type, tz);
|
||||
|
@ -35,4 +34,4 @@ datetime_datetime_now(PyTypeObject *type, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=a5c51b96f10c462c input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=7f45c670d6e4953a input=a9049054013a1b77]*/
|
||||
|
|
|
@ -59,8 +59,7 @@ _dbm_dbm_get(dbmobject *self, PyObject *args)
|
|||
Py_ssize_clean_t key_length;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"s#|O:get",
|
||||
if (!PyArg_ParseTuple(args, "s#|O:get",
|
||||
&key, &key_length, &default_value))
|
||||
goto exit;
|
||||
return_value = _dbm_dbm_get_impl(self, key, key_length, default_value);
|
||||
|
@ -93,8 +92,7 @@ _dbm_dbm_setdefault(dbmobject *self, PyObject *args)
|
|||
Py_ssize_clean_t key_length;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"s#|O:setdefault",
|
||||
if (!PyArg_ParseTuple(args, "s#|O:setdefault",
|
||||
&key, &key_length, &default_value))
|
||||
goto exit;
|
||||
return_value = _dbm_dbm_setdefault_impl(self, key, key_length, default_value);
|
||||
|
@ -132,8 +130,7 @@ dbmopen(PyModuleDef *module, PyObject *args)
|
|||
const char *flags = "r";
|
||||
int mode = 438;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"s|si:open",
|
||||
if (!PyArg_ParseTuple(args, "s|si:open",
|
||||
&filename, &flags, &mode))
|
||||
goto exit;
|
||||
return_value = dbmopen_impl(module, filename, flags, mode);
|
||||
|
@ -141,4 +138,4 @@ dbmopen(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=951fcfdb6d667a61 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=1d92e81b28c558d0 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -147,9 +147,7 @@ _gdbm_gdbm_nextkey(dbmobject *self, PyObject *arg)
|
|||
const char *key;
|
||||
Py_ssize_clean_t key_length;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"s#:nextkey",
|
||||
&key, &key_length))
|
||||
if (!PyArg_Parse(arg, "s#:nextkey", &key, &key_length))
|
||||
goto exit;
|
||||
return_value = _gdbm_gdbm_nextkey_impl(self, key, key_length);
|
||||
|
||||
|
@ -244,8 +242,7 @@ dbmopen(PyModuleDef *module, PyObject *args)
|
|||
const char *flags = "r";
|
||||
int mode = 438;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"s|si:open",
|
||||
if (!PyArg_ParseTuple(args, "s|si:open",
|
||||
&name, &flags, &mode))
|
||||
goto exit;
|
||||
return_value = dbmopen_impl(module, name, flags, mode);
|
||||
|
@ -253,4 +250,4 @@ dbmopen(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=b41c68a5f30699cb input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=d3d8d871bcccb68a input=a9049054013a1b77]*/
|
||||
|
|
|
@ -25,9 +25,7 @@ _lzma_LZMACompressor_compress(Compressor *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:compress",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:compress", &data))
|
||||
goto exit;
|
||||
return_value = _lzma_LZMACompressor_compress_impl(self, &data);
|
||||
|
||||
|
@ -95,8 +93,7 @@ _lzma_LZMADecompressor_decompress(Decompressor *self, PyObject *args, PyObject *
|
|||
Py_buffer data = {NULL, NULL};
|
||||
Py_ssize_t max_length = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"y*|n:decompress", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|n:decompress", _keywords,
|
||||
&data, &max_length))
|
||||
goto exit;
|
||||
return_value = _lzma_LZMADecompressor_decompress_impl(self, &data, max_length);
|
||||
|
@ -145,8 +142,7 @@ _lzma_LZMADecompressor___init__(PyObject *self, PyObject *args, PyObject *kwargs
|
|||
PyObject *memlimit = Py_None;
|
||||
PyObject *filters = Py_None;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|iOO:LZMADecompressor", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iOO:LZMADecompressor", _keywords,
|
||||
&format, &memlimit, &filters))
|
||||
goto exit;
|
||||
return_value = _lzma_LZMADecompressor___init___impl((Decompressor *)self, format, memlimit, filters);
|
||||
|
@ -175,9 +171,7 @@ _lzma_is_check_supported(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int check_id;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"i:is_check_supported",
|
||||
&check_id))
|
||||
if (!PyArg_Parse(arg, "i:is_check_supported", &check_id))
|
||||
goto exit;
|
||||
return_value = _lzma_is_check_supported_impl(module, check_id);
|
||||
|
||||
|
@ -205,9 +199,7 @@ _lzma__encode_filter_properties(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
lzma_filter filter = {LZMA_VLI_UNKNOWN, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:_encode_filter_properties",
|
||||
lzma_filter_converter, &filter))
|
||||
if (!PyArg_Parse(arg, "O&:_encode_filter_properties", lzma_filter_converter, &filter))
|
||||
goto exit;
|
||||
return_value = _lzma__encode_filter_properties_impl(module, filter);
|
||||
|
||||
|
@ -241,8 +233,7 @@ _lzma__decode_filter_properties(PyModuleDef *module, PyObject *args)
|
|||
lzma_vli filter_id;
|
||||
Py_buffer encoded_props = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O&y*:_decode_filter_properties",
|
||||
if (!PyArg_ParseTuple(args, "O&y*:_decode_filter_properties",
|
||||
lzma_vli_converter, &filter_id, &encoded_props))
|
||||
goto exit;
|
||||
return_value = _lzma__decode_filter_properties_impl(module, filter_id, &encoded_props);
|
||||
|
@ -254,4 +245,4 @@ exit:
|
|||
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=8981089cde080b54 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=2d3e0842be3d3fe1 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -22,8 +22,7 @@ _opcode_stack_effect(PyModuleDef *module, PyObject *args)
|
|||
PyObject *oparg = Py_None;
|
||||
int _return_value;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"i|O:stack_effect",
|
||||
if (!PyArg_ParseTuple(args, "i|O:stack_effect",
|
||||
&opcode, &oparg))
|
||||
goto exit;
|
||||
_return_value = _opcode_stack_effect_impl(module, opcode, oparg);
|
||||
|
@ -34,4 +33,4 @@ _opcode_stack_effect(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=dbe45148bc21ecdf input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=8ee7cb735705e8b3 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -97,8 +97,7 @@ _pickle_Pickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *protocol = NULL;
|
||||
int fix_imports = 1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|Op:Pickler", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Op:Pickler", _keywords,
|
||||
&file, &protocol, &fix_imports))
|
||||
goto exit;
|
||||
return_value = _pickle_Pickler___init___impl((PicklerObject *)self, file, protocol, fix_imports);
|
||||
|
@ -288,8 +287,7 @@ _pickle_Unpickler___init__(PyObject *self, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = "ASCII";
|
||||
const char *errors = "strict";
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|$pss:Unpickler", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:Unpickler", _keywords,
|
||||
&file, &fix_imports, &encoding, &errors))
|
||||
goto exit;
|
||||
return_value = _pickle_Unpickler___init___impl((UnpicklerObject *)self, file, fix_imports, encoding, errors);
|
||||
|
@ -395,8 +393,7 @@ _pickle_dump(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
PyObject *protocol = NULL;
|
||||
int fix_imports = 1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"OO|O$p:dump", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O$p:dump", _keywords,
|
||||
&obj, &file, &protocol, &fix_imports))
|
||||
goto exit;
|
||||
return_value = _pickle_dump_impl(module, obj, file, protocol, fix_imports);
|
||||
|
@ -439,8 +436,7 @@ _pickle_dumps(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
PyObject *protocol = NULL;
|
||||
int fix_imports = 1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|O$p:dumps", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O$p:dumps", _keywords,
|
||||
&obj, &protocol, &fix_imports))
|
||||
goto exit;
|
||||
return_value = _pickle_dumps_impl(module, obj, protocol, fix_imports);
|
||||
|
@ -495,8 +491,7 @@ _pickle_load(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = "ASCII";
|
||||
const char *errors = "strict";
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|$pss:load", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:load", _keywords,
|
||||
&file, &fix_imports, &encoding, &errors))
|
||||
goto exit;
|
||||
return_value = _pickle_load_impl(module, file, fix_imports, encoding, errors);
|
||||
|
@ -542,8 +537,7 @@ _pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = "ASCII";
|
||||
const char *errors = "strict";
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O|$pss:loads", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|$pss:loads", _keywords,
|
||||
&data, &fix_imports, &encoding, &errors))
|
||||
goto exit;
|
||||
return_value = _pickle_loads_impl(module, data, fix_imports, encoding, errors);
|
||||
|
@ -551,4 +545,4 @@ _pickle_loads(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=2c413ecc2ec74f7c input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=06f3a5233298448e input=a9049054013a1b77]*/
|
||||
|
|
|
@ -76,8 +76,7 @@ array_array_pop(arrayobject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t i = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|n:pop",
|
||||
if (!PyArg_ParseTuple(args, "|n:pop",
|
||||
&i))
|
||||
goto exit;
|
||||
return_value = array_array_pop_impl(self, i);
|
||||
|
@ -114,8 +113,7 @@ array_array_insert(arrayobject *self, PyObject *args)
|
|||
Py_ssize_t i;
|
||||
PyObject *v;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"nO:insert",
|
||||
if (!PyArg_ParseTuple(args, "nO:insert",
|
||||
&i, &v))
|
||||
goto exit;
|
||||
return_value = array_array_insert_impl(self, i, v);
|
||||
|
@ -212,8 +210,7 @@ array_array_fromfile(arrayobject *self, PyObject *args)
|
|||
PyObject *f;
|
||||
Py_ssize_t n;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"On:fromfile",
|
||||
if (!PyArg_ParseTuple(args, "On:fromfile",
|
||||
&f, &n))
|
||||
goto exit;
|
||||
return_value = array_array_fromfile_impl(self, f, n);
|
||||
|
@ -278,9 +275,7 @@ array_array_fromstring(arrayobject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"s*:fromstring",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "s*:fromstring", &buffer))
|
||||
goto exit;
|
||||
return_value = array_array_fromstring_impl(self, &buffer);
|
||||
|
||||
|
@ -310,9 +305,7 @@ array_array_frombytes(arrayobject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer buffer = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:frombytes",
|
||||
&buffer))
|
||||
if (!PyArg_Parse(arg, "y*:frombytes", &buffer))
|
||||
goto exit;
|
||||
return_value = array_array_frombytes_impl(self, &buffer);
|
||||
|
||||
|
@ -386,9 +379,7 @@ array_array_fromunicode(arrayobject *self, PyObject *arg)
|
|||
Py_UNICODE *ustr;
|
||||
Py_ssize_clean_t ustr_length;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"u#:fromunicode",
|
||||
&ustr, &ustr_length))
|
||||
if (!PyArg_Parse(arg, "u#:fromunicode", &ustr, &ustr_length))
|
||||
goto exit;
|
||||
return_value = array_array_fromunicode_impl(self, ustr, ustr_length);
|
||||
|
||||
|
@ -461,8 +452,7 @@ array__array_reconstructor(PyModuleDef *module, PyObject *args)
|
|||
enum machine_format_code mformat_code;
|
||||
PyObject *items;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"OCiO:_array_reconstructor",
|
||||
if (!PyArg_ParseTuple(args, "OCiO:_array_reconstructor",
|
||||
&arraytype, &typecode, &mformat_code, &items))
|
||||
goto exit;
|
||||
return_value = array__array_reconstructor_impl(module, arraytype, typecode, mformat_code, items);
|
||||
|
@ -506,4 +496,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
|
|||
|
||||
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
|
||||
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
|
||||
/*[clinic end generated code: output=48e8198c8087cd00 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=d2e82c65ea841cfc input=a9049054013a1b77]*/
|
||||
|
|
|
@ -23,8 +23,7 @@ audioop_getsample(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
Py_ssize_t index;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*in:getsample",
|
||||
if (!PyArg_ParseTuple(args, "y*in:getsample",
|
||||
&fragment, &width, &index))
|
||||
goto exit;
|
||||
return_value = audioop_getsample_impl(module, &fragment, width, index);
|
||||
|
@ -56,8 +55,7 @@ audioop_max(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:max",
|
||||
if (!PyArg_ParseTuple(args, "y*i:max",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_max_impl(module, &fragment, width);
|
||||
|
@ -89,8 +87,7 @@ audioop_minmax(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:minmax",
|
||||
if (!PyArg_ParseTuple(args, "y*i:minmax",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_minmax_impl(module, &fragment, width);
|
||||
|
@ -122,8 +119,7 @@ audioop_avg(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:avg",
|
||||
if (!PyArg_ParseTuple(args, "y*i:avg",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_avg_impl(module, &fragment, width);
|
||||
|
@ -155,8 +151,7 @@ audioop_rms(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:rms",
|
||||
if (!PyArg_ParseTuple(args, "y*i:rms",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_rms_impl(module, &fragment, width);
|
||||
|
@ -189,8 +184,7 @@ audioop_findfit(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
Py_buffer reference = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*:findfit",
|
||||
if (!PyArg_ParseTuple(args, "y*y*:findfit",
|
||||
&fragment, &reference))
|
||||
goto exit;
|
||||
return_value = audioop_findfit_impl(module, &fragment, &reference);
|
||||
|
@ -226,8 +220,7 @@ audioop_findfactor(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
Py_buffer reference = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*:findfactor",
|
||||
if (!PyArg_ParseTuple(args, "y*y*:findfactor",
|
||||
&fragment, &reference))
|
||||
goto exit;
|
||||
return_value = audioop_findfactor_impl(module, &fragment, &reference);
|
||||
|
@ -263,8 +256,7 @@ audioop_findmax(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
Py_ssize_t length;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*n:findmax",
|
||||
if (!PyArg_ParseTuple(args, "y*n:findmax",
|
||||
&fragment, &length))
|
||||
goto exit;
|
||||
return_value = audioop_findmax_impl(module, &fragment, length);
|
||||
|
@ -296,8 +288,7 @@ audioop_avgpp(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:avgpp",
|
||||
if (!PyArg_ParseTuple(args, "y*i:avgpp",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_avgpp_impl(module, &fragment, width);
|
||||
|
@ -329,8 +320,7 @@ audioop_maxpp(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:maxpp",
|
||||
if (!PyArg_ParseTuple(args, "y*i:maxpp",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_maxpp_impl(module, &fragment, width);
|
||||
|
@ -362,8 +352,7 @@ audioop_cross(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:cross",
|
||||
if (!PyArg_ParseTuple(args, "y*i:cross",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_cross_impl(module, &fragment, width);
|
||||
|
@ -397,8 +386,7 @@ audioop_mul(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
double factor;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*id:mul",
|
||||
if (!PyArg_ParseTuple(args, "y*id:mul",
|
||||
&fragment, &width, &factor))
|
||||
goto exit;
|
||||
return_value = audioop_mul_impl(module, &fragment, width, factor);
|
||||
|
@ -433,8 +421,7 @@ audioop_tomono(PyModuleDef *module, PyObject *args)
|
|||
double lfactor;
|
||||
double rfactor;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*idd:tomono",
|
||||
if (!PyArg_ParseTuple(args, "y*idd:tomono",
|
||||
&fragment, &width, &lfactor, &rfactor))
|
||||
goto exit;
|
||||
return_value = audioop_tomono_impl(module, &fragment, width, lfactor, rfactor);
|
||||
|
@ -469,8 +456,7 @@ audioop_tostereo(PyModuleDef *module, PyObject *args)
|
|||
double lfactor;
|
||||
double rfactor;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*idd:tostereo",
|
||||
if (!PyArg_ParseTuple(args, "y*idd:tostereo",
|
||||
&fragment, &width, &lfactor, &rfactor))
|
||||
goto exit;
|
||||
return_value = audioop_tostereo_impl(module, &fragment, width, lfactor, rfactor);
|
||||
|
@ -504,8 +490,7 @@ audioop_add(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment2 = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*i:add",
|
||||
if (!PyArg_ParseTuple(args, "y*y*i:add",
|
||||
&fragment1, &fragment2, &width))
|
||||
goto exit;
|
||||
return_value = audioop_add_impl(module, &fragment1, &fragment2, width);
|
||||
|
@ -542,8 +527,7 @@ audioop_bias(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
int bias;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*ii:bias",
|
||||
if (!PyArg_ParseTuple(args, "y*ii:bias",
|
||||
&fragment, &width, &bias))
|
||||
goto exit;
|
||||
return_value = audioop_bias_impl(module, &fragment, width, bias);
|
||||
|
@ -575,8 +559,7 @@ audioop_reverse(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:reverse",
|
||||
if (!PyArg_ParseTuple(args, "y*i:reverse",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_reverse_impl(module, &fragment, width);
|
||||
|
@ -608,8 +591,7 @@ audioop_byteswap(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:byteswap",
|
||||
if (!PyArg_ParseTuple(args, "y*i:byteswap",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_byteswap_impl(module, &fragment, width);
|
||||
|
@ -643,8 +625,7 @@ audioop_lin2lin(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
int newwidth;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*ii:lin2lin",
|
||||
if (!PyArg_ParseTuple(args, "y*ii:lin2lin",
|
||||
&fragment, &width, &newwidth))
|
||||
goto exit;
|
||||
return_value = audioop_lin2lin_impl(module, &fragment, width, newwidth);
|
||||
|
@ -685,8 +666,7 @@ audioop_ratecv(PyModuleDef *module, PyObject *args)
|
|||
int weightA = 1;
|
||||
int weightB = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*iiiiO|ii:ratecv",
|
||||
if (!PyArg_ParseTuple(args, "y*iiiiO|ii:ratecv",
|
||||
&fragment, &width, &nchannels, &inrate, &outrate, &state, &weightA, &weightB))
|
||||
goto exit;
|
||||
return_value = audioop_ratecv_impl(module, &fragment, width, nchannels, inrate, outrate, state, weightA, weightB);
|
||||
|
@ -718,8 +698,7 @@ audioop_lin2ulaw(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:lin2ulaw",
|
||||
if (!PyArg_ParseTuple(args, "y*i:lin2ulaw",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_lin2ulaw_impl(module, &fragment, width);
|
||||
|
@ -751,8 +730,7 @@ audioop_ulaw2lin(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:ulaw2lin",
|
||||
if (!PyArg_ParseTuple(args, "y*i:ulaw2lin",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_ulaw2lin_impl(module, &fragment, width);
|
||||
|
@ -784,8 +762,7 @@ audioop_lin2alaw(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:lin2alaw",
|
||||
if (!PyArg_ParseTuple(args, "y*i:lin2alaw",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_lin2alaw_impl(module, &fragment, width);
|
||||
|
@ -817,8 +794,7 @@ audioop_alaw2lin(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer fragment = {NULL, NULL};
|
||||
int width;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*i:alaw2lin",
|
||||
if (!PyArg_ParseTuple(args, "y*i:alaw2lin",
|
||||
&fragment, &width))
|
||||
goto exit;
|
||||
return_value = audioop_alaw2lin_impl(module, &fragment, width);
|
||||
|
@ -852,8 +828,7 @@ audioop_lin2adpcm(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
PyObject *state;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*iO:lin2adpcm",
|
||||
if (!PyArg_ParseTuple(args, "y*iO:lin2adpcm",
|
||||
&fragment, &width, &state))
|
||||
goto exit;
|
||||
return_value = audioop_lin2adpcm_impl(module, &fragment, width, state);
|
||||
|
@ -887,8 +862,7 @@ audioop_adpcm2lin(PyModuleDef *module, PyObject *args)
|
|||
int width;
|
||||
PyObject *state;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*iO:adpcm2lin",
|
||||
if (!PyArg_ParseTuple(args, "y*iO:adpcm2lin",
|
||||
&fragment, &width, &state))
|
||||
goto exit;
|
||||
return_value = audioop_adpcm2lin_impl(module, &fragment, width, state);
|
||||
|
@ -900,4 +874,4 @@ exit:
|
|||
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=9b01aafef50425ae input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=a076e1b213a8727b input=a9049054013a1b77]*/
|
||||
|
|
|
@ -20,9 +20,7 @@ binascii_a2b_uu(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:a2b_uu",
|
||||
ascii_buffer_converter, &data))
|
||||
if (!PyArg_Parse(arg, "O&:a2b_uu", ascii_buffer_converter, &data))
|
||||
goto exit;
|
||||
return_value = binascii_a2b_uu_impl(module, &data);
|
||||
|
||||
|
@ -52,9 +50,7 @@ binascii_b2a_uu(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:b2a_uu",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:b2a_uu", &data))
|
||||
goto exit;
|
||||
return_value = binascii_b2a_uu_impl(module, &data);
|
||||
|
||||
|
@ -84,9 +80,7 @@ binascii_a2b_base64(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:a2b_base64",
|
||||
ascii_buffer_converter, &data))
|
||||
if (!PyArg_Parse(arg, "O&:a2b_base64", ascii_buffer_converter, &data))
|
||||
goto exit;
|
||||
return_value = binascii_a2b_base64_impl(module, &data);
|
||||
|
||||
|
@ -116,9 +110,7 @@ binascii_b2a_base64(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:b2a_base64",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:b2a_base64", &data))
|
||||
goto exit;
|
||||
return_value = binascii_b2a_base64_impl(module, &data);
|
||||
|
||||
|
@ -148,9 +140,7 @@ binascii_a2b_hqx(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:a2b_hqx",
|
||||
ascii_buffer_converter, &data))
|
||||
if (!PyArg_Parse(arg, "O&:a2b_hqx", ascii_buffer_converter, &data))
|
||||
goto exit;
|
||||
return_value = binascii_a2b_hqx_impl(module, &data);
|
||||
|
||||
|
@ -180,9 +170,7 @@ binascii_rlecode_hqx(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:rlecode_hqx",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:rlecode_hqx", &data))
|
||||
goto exit;
|
||||
return_value = binascii_rlecode_hqx_impl(module, &data);
|
||||
|
||||
|
@ -212,9 +200,7 @@ binascii_b2a_hqx(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:b2a_hqx",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:b2a_hqx", &data))
|
||||
goto exit;
|
||||
return_value = binascii_b2a_hqx_impl(module, &data);
|
||||
|
||||
|
@ -244,9 +230,7 @@ binascii_rledecode_hqx(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:rledecode_hqx",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:rledecode_hqx", &data))
|
||||
goto exit;
|
||||
return_value = binascii_rledecode_hqx_impl(module, &data);
|
||||
|
||||
|
@ -278,8 +262,7 @@ binascii_crc_hqx(PyModuleDef *module, PyObject *args)
|
|||
unsigned int crc;
|
||||
unsigned int _return_value;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*I:crc_hqx",
|
||||
if (!PyArg_ParseTuple(args, "y*I:crc_hqx",
|
||||
&data, &crc))
|
||||
goto exit;
|
||||
_return_value = binascii_crc_hqx_impl(module, &data, crc);
|
||||
|
@ -315,8 +298,7 @@ binascii_crc32(PyModuleDef *module, PyObject *args)
|
|||
unsigned int crc = 0;
|
||||
unsigned int _return_value;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|I:crc32",
|
||||
if (!PyArg_ParseTuple(args, "y*|I:crc32",
|
||||
&data, &crc))
|
||||
goto exit;
|
||||
_return_value = binascii_crc32_impl(module, &data, crc);
|
||||
|
@ -353,9 +335,7 @@ binascii_b2a_hex(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:b2a_hex",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:b2a_hex", &data))
|
||||
goto exit;
|
||||
return_value = binascii_b2a_hex_impl(module, &data);
|
||||
|
||||
|
@ -387,9 +367,7 @@ binascii_hexlify(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:hexlify",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:hexlify", &data))
|
||||
goto exit;
|
||||
return_value = binascii_hexlify_impl(module, &data);
|
||||
|
||||
|
@ -422,9 +400,7 @@ binascii_a2b_hex(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer hexstr = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:a2b_hex",
|
||||
ascii_buffer_converter, &hexstr))
|
||||
if (!PyArg_Parse(arg, "O&:a2b_hex", ascii_buffer_converter, &hexstr))
|
||||
goto exit;
|
||||
return_value = binascii_a2b_hex_impl(module, &hexstr);
|
||||
|
||||
|
@ -456,9 +432,7 @@ binascii_unhexlify(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer hexstr = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:unhexlify",
|
||||
ascii_buffer_converter, &hexstr))
|
||||
if (!PyArg_Parse(arg, "O&:unhexlify", ascii_buffer_converter, &hexstr))
|
||||
goto exit;
|
||||
return_value = binascii_unhexlify_impl(module, &hexstr);
|
||||
|
||||
|
@ -490,8 +464,7 @@ binascii_a2b_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
Py_buffer data = {NULL, NULL};
|
||||
int header = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O&|i:a2b_qp", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&|i:a2b_qp", _keywords,
|
||||
ascii_buffer_converter, &data, &header))
|
||||
goto exit;
|
||||
return_value = binascii_a2b_qp_impl(module, &data, header);
|
||||
|
@ -531,8 +504,7 @@ binascii_b2a_qp(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
int istext = 1;
|
||||
int header = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"y*|iii:b2a_qp", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "y*|iii:b2a_qp", _keywords,
|
||||
&data, "etabs, &istext, &header))
|
||||
goto exit;
|
||||
return_value = binascii_b2a_qp_impl(module, &data, quotetabs, istext, header);
|
||||
|
@ -544,4 +516,4 @@ exit:
|
|||
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=5f8d3578618b3432 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=b1a3cbf7660ebaa5 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -21,9 +21,7 @@ cmath_acos(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:acos",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:acos", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -64,9 +62,7 @@ cmath_acosh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:acosh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:acosh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -107,9 +103,7 @@ cmath_asin(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:asin",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:asin", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -150,9 +144,7 @@ cmath_asinh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:asinh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:asinh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -193,9 +185,7 @@ cmath_atan(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:atan",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:atan", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -236,9 +226,7 @@ cmath_atanh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:atanh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:atanh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -279,9 +267,7 @@ cmath_cos(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:cos",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:cos", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -322,9 +308,7 @@ cmath_cosh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:cosh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:cosh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -365,9 +349,7 @@ cmath_exp(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:exp",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:exp", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -408,9 +390,7 @@ cmath_log10(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:log10",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:log10", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -451,9 +431,7 @@ cmath_sin(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:sin",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:sin", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -494,9 +472,7 @@ cmath_sinh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:sinh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:sinh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -537,9 +513,7 @@ cmath_sqrt(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:sqrt",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:sqrt", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -580,9 +554,7 @@ cmath_tan(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:tan",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:tan", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -623,9 +595,7 @@ cmath_tanh(PyModuleDef *module, PyObject *arg)
|
|||
Py_complex z;
|
||||
Py_complex _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:tanh",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:tanh", &z))
|
||||
goto exit;
|
||||
/* modifications for z */
|
||||
errno = 0; PyFPE_START_PROTECT("complex function", goto exit);
|
||||
|
@ -668,8 +638,7 @@ cmath_log(PyModuleDef *module, PyObject *args)
|
|||
Py_complex x;
|
||||
PyObject *y_obj = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"D|O:log",
|
||||
if (!PyArg_ParseTuple(args, "D|O:log",
|
||||
&x, &y_obj))
|
||||
goto exit;
|
||||
return_value = cmath_log_impl(module, x, y_obj);
|
||||
|
@ -696,9 +665,7 @@ cmath_phase(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_complex z;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:phase",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:phase", &z))
|
||||
goto exit;
|
||||
return_value = cmath_phase_impl(module, z);
|
||||
|
||||
|
@ -726,9 +693,7 @@ cmath_polar(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_complex z;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:polar",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:polar", &z))
|
||||
goto exit;
|
||||
return_value = cmath_polar_impl(module, z);
|
||||
|
||||
|
@ -755,8 +720,7 @@ cmath_rect(PyModuleDef *module, PyObject *args)
|
|||
double r;
|
||||
double phi;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"dd:rect",
|
||||
if (!PyArg_ParseTuple(args, "dd:rect",
|
||||
&r, &phi))
|
||||
goto exit;
|
||||
return_value = cmath_rect_impl(module, r, phi);
|
||||
|
@ -783,9 +747,7 @@ cmath_isfinite(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_complex z;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:isfinite",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:isfinite", &z))
|
||||
goto exit;
|
||||
return_value = cmath_isfinite_impl(module, z);
|
||||
|
||||
|
@ -811,9 +773,7 @@ cmath_isnan(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_complex z;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:isnan",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:isnan", &z))
|
||||
goto exit;
|
||||
return_value = cmath_isnan_impl(module, z);
|
||||
|
||||
|
@ -839,13 +799,11 @@ cmath_isinf(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_complex z;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"D:isinf",
|
||||
&z))
|
||||
if (!PyArg_Parse(arg, "D:isinf", &z))
|
||||
goto exit;
|
||||
return_value = cmath_isinf_impl(module, z);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=9143b8dcc8069024 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=274f59792cf4f418 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -32,8 +32,7 @@ fcntl_fcntl(PyModuleDef *module, PyObject *args)
|
|||
int code;
|
||||
PyObject *arg = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O&i|O:fcntl",
|
||||
if (!PyArg_ParseTuple(args, "O&i|O:fcntl",
|
||||
conv_descriptor, &fd, &code, &arg))
|
||||
goto exit;
|
||||
return_value = fcntl_fcntl_impl(module, fd, code, arg);
|
||||
|
@ -91,8 +90,7 @@ fcntl_ioctl(PyModuleDef *module, PyObject *args)
|
|||
PyObject *ob_arg = NULL;
|
||||
int mutate_arg = 1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O&I|Op:ioctl",
|
||||
if (!PyArg_ParseTuple(args, "O&I|Op:ioctl",
|
||||
conv_descriptor, &fd, &code, &ob_arg, &mutate_arg))
|
||||
goto exit;
|
||||
return_value = fcntl_ioctl_impl(module, fd, code, ob_arg, mutate_arg);
|
||||
|
@ -123,8 +121,7 @@ fcntl_flock(PyModuleDef *module, PyObject *args)
|
|||
int fd;
|
||||
int code;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O&i:flock",
|
||||
if (!PyArg_ParseTuple(args, "O&i:flock",
|
||||
conv_descriptor, &fd, &code))
|
||||
goto exit;
|
||||
return_value = fcntl_flock_impl(module, fd, code);
|
||||
|
@ -177,8 +174,7 @@ fcntl_lockf(PyModuleDef *module, PyObject *args)
|
|||
PyObject *startobj = NULL;
|
||||
int whence = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O&i|OOi:lockf",
|
||||
if (!PyArg_ParseTuple(args, "O&i|OOi:lockf",
|
||||
conv_descriptor, &fd, &code, &lenobj, &startobj, &whence))
|
||||
goto exit;
|
||||
return_value = fcntl_lockf_impl(module, fd, code, lenobj, startobj, whence);
|
||||
|
@ -186,4 +182,4 @@ fcntl_lockf(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=badaa968eb04410d input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=92963b631d00f0fe input=a9049054013a1b77]*/
|
||||
|
|
|
@ -23,8 +23,7 @@ grp_getgrgid(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"id", NULL};
|
||||
PyObject *id;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"O:getgrgid", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:getgrgid", _keywords,
|
||||
&id))
|
||||
goto exit;
|
||||
return_value = grp_getgrgid_impl(module, id);
|
||||
|
@ -54,8 +53,7 @@ grp_getgrnam(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"name", NULL};
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"U:getgrnam", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "U:getgrnam", _keywords,
|
||||
&name))
|
||||
goto exit;
|
||||
return_value = grp_getgrnam_impl(module, name);
|
||||
|
@ -84,4 +82,4 @@ grp_getgrall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return grp_getgrall_impl(module);
|
||||
}
|
||||
/*[clinic end generated code: output=4709a6ba40bb8df9 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=5191c25600afb1bd input=a9049054013a1b77]*/
|
||||
|
|
|
@ -84,8 +84,7 @@ _md5_md5(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:md5", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:md5", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _md5_md5_impl(module, string);
|
||||
|
@ -93,4 +92,4 @@ _md5_md5(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=f72618edfd35d984 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=0f803ded701aca54 input=a9049054013a1b77]*/
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,9 +33,7 @@ pwd_getpwnam(PyModuleDef *module, PyObject *arg_)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *arg;
|
||||
|
||||
if (!PyArg_Parse(arg_,
|
||||
"U:getpwnam",
|
||||
&arg))
|
||||
if (!PyArg_Parse(arg_, "U:getpwnam", &arg))
|
||||
goto exit;
|
||||
return_value = pwd_getpwnam_impl(module, arg);
|
||||
|
||||
|
@ -70,4 +68,4 @@ pwd_getpwall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef PWD_GETPWALL_METHODDEF
|
||||
#define PWD_GETPWALL_METHODDEF
|
||||
#endif /* !defined(PWD_GETPWALL_METHODDEF) */
|
||||
/*[clinic end generated code: output=e7d5ac24b20e91ae input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=2ed0ecf34fd3f98f input=a9049054013a1b77]*/
|
||||
|
|
|
@ -24,8 +24,7 @@ pyexpat_xmlparser_Parse(xmlparseobject *self, PyObject *args)
|
|||
PyObject *data;
|
||||
int isFinal = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|i:Parse",
|
||||
if (!PyArg_ParseTuple(args, "O|i:Parse",
|
||||
&data, &isFinal))
|
||||
goto exit;
|
||||
return_value = pyexpat_xmlparser_Parse_impl(self, data, isFinal);
|
||||
|
@ -61,9 +60,7 @@ pyexpat_xmlparser_SetBase(xmlparseobject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
const char *base;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"s:SetBase",
|
||||
&base))
|
||||
if (!PyArg_Parse(arg, "s:SetBase", &base))
|
||||
goto exit;
|
||||
return_value = pyexpat_xmlparser_SetBase_impl(self, base);
|
||||
|
||||
|
@ -131,8 +128,7 @@ pyexpat_xmlparser_ExternalEntityParserCreate(xmlparseobject *self, PyObject *arg
|
|||
const char *context;
|
||||
const char *encoding = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"z|s:ExternalEntityParserCreate",
|
||||
if (!PyArg_ParseTuple(args, "z|s:ExternalEntityParserCreate",
|
||||
&context, &encoding))
|
||||
goto exit;
|
||||
return_value = pyexpat_xmlparser_ExternalEntityParserCreate_impl(self, context, encoding);
|
||||
|
@ -164,9 +160,7 @@ pyexpat_xmlparser_SetParamEntityParsing(xmlparseobject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int flag;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"i:SetParamEntityParsing",
|
||||
&flag))
|
||||
if (!PyArg_Parse(arg, "i:SetParamEntityParsing", &flag))
|
||||
goto exit;
|
||||
return_value = pyexpat_xmlparser_SetParamEntityParsing_impl(self, flag);
|
||||
|
||||
|
@ -198,8 +192,7 @@ pyexpat_xmlparser_UseForeignDTD(xmlparseobject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
int flag = 1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|p:UseForeignDTD",
|
||||
if (!PyArg_ParseTuple(args, "|p:UseForeignDTD",
|
||||
&flag))
|
||||
goto exit;
|
||||
return_value = pyexpat_xmlparser_UseForeignDTD_impl(self, flag);
|
||||
|
@ -250,8 +243,7 @@ pyexpat_ParserCreate(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
const char *namespace_separator = NULL;
|
||||
PyObject *intern = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|zzO:ParserCreate", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zzO:ParserCreate", _keywords,
|
||||
&encoding, &namespace_separator, &intern))
|
||||
goto exit;
|
||||
return_value = pyexpat_ParserCreate_impl(module, encoding, namespace_separator, intern);
|
||||
|
@ -278,9 +270,7 @@ pyexpat_ErrorString(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
long code;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"l:ErrorString",
|
||||
&code))
|
||||
if (!PyArg_Parse(arg, "l:ErrorString", &code))
|
||||
goto exit;
|
||||
return_value = pyexpat_ErrorString_impl(module, code);
|
||||
|
||||
|
@ -291,4 +281,4 @@ exit:
|
|||
#ifndef PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
|
||||
#define PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF
|
||||
#endif /* !defined(PYEXPAT_XMLPARSER_USEFOREIGNDTD_METHODDEF) */
|
||||
/*[clinic end generated code: output=abdf05a21dae98c7 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=958c0faa1b855fc7 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -84,8 +84,7 @@ _sha1_sha1(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:sha1", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha1", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _sha1_sha1_impl(module, string);
|
||||
|
@ -93,4 +92,4 @@ _sha1_sha1(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=b2890b9ca964b217 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=be19102f3120490a input=a9049054013a1b77]*/
|
||||
|
|
|
@ -84,8 +84,7 @@ _sha256_sha256(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:sha256", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha256", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _sha256_sha256_impl(module, string);
|
||||
|
@ -113,8 +112,7 @@ _sha256_sha224(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:sha224", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha224", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _sha256_sha224_impl(module, string);
|
||||
|
@ -122,4 +120,4 @@ _sha256_sha224(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=8a0520371b097358 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=354cedf3b632c7b2 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -102,8 +102,7 @@ _sha512_sha512(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:sha512", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha512", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _sha512_sha512_impl(module, string);
|
||||
|
@ -135,8 +134,7 @@ _sha512_sha384(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"string", NULL};
|
||||
PyObject *string = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|O:sha384", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:sha384", _keywords,
|
||||
&string))
|
||||
goto exit;
|
||||
return_value = _sha512_sha384_impl(module, string);
|
||||
|
@ -170,4 +168,4 @@ exit:
|
|||
#ifndef _SHA512_SHA384_METHODDEF
|
||||
#define _SHA512_SHA384_METHODDEF
|
||||
#endif /* !defined(_SHA512_SHA384_METHODDEF) */
|
||||
/*[clinic end generated code: output=de7bda19fde49310 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=1c7d385731fee7c0 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -24,9 +24,7 @@ spwd_getspnam(PyModuleDef *module, PyObject *arg_)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *arg;
|
||||
|
||||
if (!PyArg_Parse(arg_,
|
||||
"U:getspnam",
|
||||
&arg))
|
||||
if (!PyArg_Parse(arg_, "U:getspnam", &arg))
|
||||
goto exit;
|
||||
return_value = spwd_getspnam_impl(module, arg);
|
||||
|
||||
|
@ -67,4 +65,4 @@ spwd_getspall(PyModuleDef *module, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef SPWD_GETSPALL_METHODDEF
|
||||
#define SPWD_GETSPALL_METHODDEF
|
||||
#endif /* !defined(SPWD_GETSPALL_METHODDEF) */
|
||||
/*[clinic end generated code: output=67a4f8c47008f28f input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=6c178830413f7763 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -26,8 +26,7 @@ unicodedata_UCD_decimal(PyObject *self, PyObject *args)
|
|||
int chr;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"C|O:decimal",
|
||||
if (!PyArg_ParseTuple(args, "C|O:decimal",
|
||||
&chr, &default_value))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_decimal_impl(self, chr, default_value);
|
||||
|
@ -59,8 +58,7 @@ unicodedata_UCD_digit(PyObject *self, PyObject *args)
|
|||
int chr;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"C|O:digit",
|
||||
if (!PyArg_ParseTuple(args, "C|O:digit",
|
||||
&chr, &default_value))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_digit_impl(self, chr, default_value);
|
||||
|
@ -93,8 +91,7 @@ unicodedata_UCD_numeric(PyObject *self, PyObject *args)
|
|||
int chr;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"C|O:numeric",
|
||||
if (!PyArg_ParseTuple(args, "C|O:numeric",
|
||||
&chr, &default_value))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_numeric_impl(self, chr, default_value);
|
||||
|
@ -121,9 +118,7 @@ unicodedata_UCD_category(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int chr;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:category",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:category", &chr))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_category_impl(self, chr);
|
||||
|
||||
|
@ -151,9 +146,7 @@ unicodedata_UCD_bidirectional(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int chr;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:bidirectional",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:bidirectional", &chr))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_bidirectional_impl(self, chr);
|
||||
|
||||
|
@ -182,9 +175,7 @@ unicodedata_UCD_combining(PyObject *self, PyObject *arg)
|
|||
int chr;
|
||||
int _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:combining",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:combining", &chr))
|
||||
goto exit;
|
||||
_return_value = unicodedata_UCD_combining_impl(self, chr);
|
||||
if ((_return_value == -1) && PyErr_Occurred())
|
||||
|
@ -217,9 +208,7 @@ unicodedata_UCD_mirrored(PyObject *self, PyObject *arg)
|
|||
int chr;
|
||||
int _return_value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:mirrored",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:mirrored", &chr))
|
||||
goto exit;
|
||||
_return_value = unicodedata_UCD_mirrored_impl(self, chr);
|
||||
if ((_return_value == -1) && PyErr_Occurred())
|
||||
|
@ -248,9 +237,7 @@ unicodedata_UCD_east_asian_width(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int chr;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:east_asian_width",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:east_asian_width", &chr))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_east_asian_width_impl(self, chr);
|
||||
|
||||
|
@ -278,9 +265,7 @@ unicodedata_UCD_decomposition(PyObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int chr;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"C:decomposition",
|
||||
&chr))
|
||||
if (!PyArg_Parse(arg, "C:decomposition", &chr))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_decomposition_impl(self, chr);
|
||||
|
||||
|
@ -310,8 +295,7 @@ unicodedata_UCD_normalize(PyObject *self, PyObject *args)
|
|||
const char *form;
|
||||
PyObject *input;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"sO!:normalize",
|
||||
if (!PyArg_ParseTuple(args, "sO!:normalize",
|
||||
&form, &PyUnicode_Type, &input))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_normalize_impl(self, form, input);
|
||||
|
@ -342,8 +326,7 @@ unicodedata_UCD_name(PyObject *self, PyObject *args)
|
|||
int chr;
|
||||
PyObject *default_value = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"C|O:name",
|
||||
if (!PyArg_ParseTuple(args, "C|O:name",
|
||||
&chr, &default_value))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_name_impl(self, chr, default_value);
|
||||
|
@ -375,13 +358,11 @@ unicodedata_UCD_lookup(PyObject *self, PyObject *arg)
|
|||
const char *name;
|
||||
Py_ssize_clean_t name_length;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"s#:lookup",
|
||||
&name, &name_length))
|
||||
if (!PyArg_Parse(arg, "s#:lookup", &name, &name_length))
|
||||
goto exit;
|
||||
return_value = unicodedata_UCD_lookup_impl(self, name, name_length);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=1f04e31ae703ffed input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=4f8da33c6bc6efc9 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -26,8 +26,7 @@ zlib_compress(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer bytes = {NULL, NULL};
|
||||
int level = Z_DEFAULT_COMPRESSION;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|i:compress",
|
||||
if (!PyArg_ParseTuple(args, "y*|i:compress",
|
||||
&bytes, &level))
|
||||
goto exit;
|
||||
return_value = zlib_compress_impl(module, &bytes, level);
|
||||
|
@ -68,8 +67,7 @@ zlib_decompress(PyModuleDef *module, PyObject *args)
|
|||
int wbits = MAX_WBITS;
|
||||
unsigned int bufsize = DEF_BUF_SIZE;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|iO&:decompress",
|
||||
if (!PyArg_ParseTuple(args, "y*|iO&:decompress",
|
||||
&data, &wbits, uint_converter, &bufsize))
|
||||
goto exit;
|
||||
return_value = zlib_decompress_impl(module, &data, wbits, bufsize);
|
||||
|
@ -127,8 +125,7 @@ zlib_compressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
int strategy = Z_DEFAULT_STRATEGY;
|
||||
Py_buffer zdict = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|iiiiiy*:compressobj", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiiiiy*:compressobj", _keywords,
|
||||
&level, &method, &wbits, &memLevel, &strategy, &zdict))
|
||||
goto exit;
|
||||
return_value = zlib_compressobj_impl(module, level, method, wbits, memLevel, strategy, &zdict);
|
||||
|
@ -167,8 +164,7 @@ zlib_decompressobj(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
int wbits = MAX_WBITS;
|
||||
PyObject *zdict = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|iO:decompressobj", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iO:decompressobj", _keywords,
|
||||
&wbits, &zdict))
|
||||
goto exit;
|
||||
return_value = zlib_decompressobj_impl(module, wbits, zdict);
|
||||
|
@ -202,9 +198,7 @@ zlib_Compress_compress(compobject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer data = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:compress",
|
||||
&data))
|
||||
if (!PyArg_Parse(arg, "y*:compress", &data))
|
||||
goto exit;
|
||||
return_value = zlib_Compress_compress_impl(self, &data);
|
||||
|
||||
|
@ -247,8 +241,7 @@ zlib_Decompress_decompress(compobject *self, PyObject *args)
|
|||
Py_buffer data = {NULL, NULL};
|
||||
unsigned int max_length = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|O&:decompress",
|
||||
if (!PyArg_ParseTuple(args, "y*|O&:decompress",
|
||||
&data, uint_converter, &max_length))
|
||||
goto exit;
|
||||
return_value = zlib_Decompress_decompress_impl(self, &data, max_length);
|
||||
|
@ -285,8 +278,7 @@ zlib_Compress_flush(compobject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
int mode = Z_FINISH;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|i:flush",
|
||||
if (!PyArg_ParseTuple(args, "|i:flush",
|
||||
&mode))
|
||||
goto exit;
|
||||
return_value = zlib_Compress_flush_impl(self, mode);
|
||||
|
@ -360,8 +352,7 @@ zlib_Decompress_flush(compobject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
unsigned int length = DEF_BUF_SIZE;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|O&:flush",
|
||||
if (!PyArg_ParseTuple(args, "|O&:flush",
|
||||
uint_converter, &length))
|
||||
goto exit;
|
||||
return_value = zlib_Decompress_flush_impl(self, length);
|
||||
|
@ -394,8 +385,7 @@ zlib_adler32(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer data = {NULL, NULL};
|
||||
unsigned int value = 1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|I:adler32",
|
||||
if (!PyArg_ParseTuple(args, "y*|I:adler32",
|
||||
&data, &value))
|
||||
goto exit;
|
||||
return_value = zlib_adler32_impl(module, &data, value);
|
||||
|
@ -432,8 +422,7 @@ zlib_crc32(PyModuleDef *module, PyObject *args)
|
|||
Py_buffer data = {NULL, NULL};
|
||||
unsigned int value = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*|I:crc32",
|
||||
if (!PyArg_ParseTuple(args, "y*|I:crc32",
|
||||
&data, &value))
|
||||
goto exit;
|
||||
return_value = zlib_crc32_impl(module, &data, value);
|
||||
|
@ -449,4 +438,4 @@ exit:
|
|||
#ifndef ZLIB_COMPRESS_COPY_METHODDEF
|
||||
#define ZLIB_COMPRESS_COPY_METHODDEF
|
||||
#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
|
||||
/*[clinic end generated code: output=6cdeb624bebfe11f input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=56ed1147bbbb4788 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -107,8 +107,7 @@ bytearray_maketrans(void *null, PyObject *args)
|
|||
Py_buffer frm = {NULL, NULL};
|
||||
Py_buffer to = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*:maketrans",
|
||||
if (!PyArg_ParseTuple(args, "y*y*:maketrans",
|
||||
&frm, &to))
|
||||
goto exit;
|
||||
return_value = bytearray_maketrans_impl(&frm, &to);
|
||||
|
@ -152,8 +151,7 @@ bytearray_replace(PyByteArrayObject *self, PyObject *args)
|
|||
Py_buffer new = {NULL, NULL};
|
||||
Py_ssize_t count = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*|n:replace",
|
||||
if (!PyArg_ParseTuple(args, "y*y*|n:replace",
|
||||
&old, &new, &count))
|
||||
goto exit;
|
||||
return_value = bytearray_replace_impl(self, &old, &new, count);
|
||||
|
@ -198,8 +196,7 @@ bytearray_split(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|On:split", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:split", _keywords,
|
||||
&sep, &maxsplit))
|
||||
goto exit;
|
||||
return_value = bytearray_split_impl(self, sep, maxsplit);
|
||||
|
@ -271,8 +268,7 @@ bytearray_rsplit(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|On:rsplit", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:rsplit", _keywords,
|
||||
&sep, &maxsplit))
|
||||
goto exit;
|
||||
return_value = bytearray_rsplit_impl(self, sep, maxsplit);
|
||||
|
@ -323,8 +319,7 @@ bytearray_insert(PyByteArrayObject *self, PyObject *args)
|
|||
Py_ssize_t index;
|
||||
int item;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"nO&:insert",
|
||||
if (!PyArg_ParseTuple(args, "nO&:insert",
|
||||
&index, _getbytevalue, &item))
|
||||
goto exit;
|
||||
return_value = bytearray_insert_impl(self, index, item);
|
||||
|
@ -354,9 +349,7 @@ bytearray_append(PyByteArrayObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int item;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:append",
|
||||
_getbytevalue, &item))
|
||||
if (!PyArg_Parse(arg, "O&:append", _getbytevalue, &item))
|
||||
goto exit;
|
||||
return_value = bytearray_append_impl(self, item);
|
||||
|
||||
|
@ -400,8 +393,7 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
Py_ssize_t index = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|n:pop",
|
||||
if (!PyArg_ParseTuple(args, "|n:pop",
|
||||
&index))
|
||||
goto exit;
|
||||
return_value = bytearray_pop_impl(self, index);
|
||||
|
@ -431,9 +423,7 @@ bytearray_remove(PyByteArrayObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int value;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"O&:remove",
|
||||
_getbytevalue, &value))
|
||||
if (!PyArg_Parse(arg, "O&:remove", _getbytevalue, &value))
|
||||
goto exit;
|
||||
return_value = bytearray_remove_impl(self, value);
|
||||
|
||||
|
@ -561,8 +551,7 @@ bytearray_decode(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = NULL;
|
||||
const char *errors = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|ss:decode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", _keywords,
|
||||
&encoding, &errors))
|
||||
goto exit;
|
||||
return_value = bytearray_decode_impl(self, encoding, errors);
|
||||
|
@ -606,8 +595,7 @@ bytearray_splitlines(PyByteArrayObject *self, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"keepends", NULL};
|
||||
int keepends = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|i:splitlines", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:splitlines", _keywords,
|
||||
&keepends))
|
||||
goto exit;
|
||||
return_value = bytearray_splitlines_impl(self, keepends);
|
||||
|
@ -637,9 +625,7 @@ bytearray_fromhex(PyTypeObject *cls, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *string;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:fromhex",
|
||||
&string))
|
||||
if (!PyArg_Parse(arg, "U:fromhex", &string))
|
||||
goto exit;
|
||||
return_value = bytearray_fromhex_impl((PyObject*)cls, string);
|
||||
|
||||
|
@ -683,8 +669,7 @@ bytearray_reduce_ex(PyByteArrayObject *self, PyObject *args)
|
|||
PyObject *return_value = NULL;
|
||||
int proto = 0;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"|i:__reduce_ex__",
|
||||
if (!PyArg_ParseTuple(args, "|i:__reduce_ex__",
|
||||
&proto))
|
||||
goto exit;
|
||||
return_value = bytearray_reduce_ex_impl(self, proto);
|
||||
|
@ -710,4 +695,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return bytearray_sizeof_impl(self);
|
||||
}
|
||||
/*[clinic end generated code: output=2a698741a4f14047 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=966c15ff22c5e243 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -30,8 +30,7 @@ bytes_split(PyBytesObject*self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|On:split", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:split", _keywords,
|
||||
&sep, &maxsplit))
|
||||
goto exit;
|
||||
return_value = bytes_split_impl(self, sep, maxsplit);
|
||||
|
@ -65,9 +64,7 @@ bytes_partition(PyBytesObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer sep = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:partition",
|
||||
&sep))
|
||||
if (!PyArg_Parse(arg, "y*:partition", &sep))
|
||||
goto exit;
|
||||
return_value = bytes_partition_impl(self, &sep);
|
||||
|
||||
|
@ -104,9 +101,7 @@ bytes_rpartition(PyBytesObject *self, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
Py_buffer sep = {NULL, NULL};
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"y*:rpartition",
|
||||
&sep))
|
||||
if (!PyArg_Parse(arg, "y*:rpartition", &sep))
|
||||
goto exit;
|
||||
return_value = bytes_rpartition_impl(self, &sep);
|
||||
|
||||
|
@ -148,8 +143,7 @@ bytes_rsplit(PyBytesObject*self, PyObject *args, PyObject *kwargs)
|
|||
PyObject *sep = Py_None;
|
||||
Py_ssize_t maxsplit = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|On:rsplit", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|On:rsplit", _keywords,
|
||||
&sep, &maxsplit))
|
||||
goto exit;
|
||||
return_value = bytes_rsplit_impl(self, sep, maxsplit);
|
||||
|
@ -332,8 +326,7 @@ bytes_maketrans(void *null, PyObject *args)
|
|||
Py_buffer frm = {NULL, NULL};
|
||||
Py_buffer to = {NULL, NULL};
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*:maketrans",
|
||||
if (!PyArg_ParseTuple(args, "y*y*:maketrans",
|
||||
&frm, &to))
|
||||
goto exit;
|
||||
return_value = bytes_maketrans_impl(&frm, &to);
|
||||
|
@ -377,8 +370,7 @@ bytes_replace(PyBytesObject*self, PyObject *args)
|
|||
Py_buffer new = {NULL, NULL};
|
||||
Py_ssize_t count = -1;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"y*y*|n:replace",
|
||||
if (!PyArg_ParseTuple(args, "y*y*|n:replace",
|
||||
&old, &new, &count))
|
||||
goto exit;
|
||||
return_value = bytes_replace_impl(self, &old, &new, count);
|
||||
|
@ -424,8 +416,7 @@ bytes_decode(PyBytesObject*self, PyObject *args, PyObject *kwargs)
|
|||
const char *encoding = NULL;
|
||||
const char *errors = NULL;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|ss:decode", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", _keywords,
|
||||
&encoding, &errors))
|
||||
goto exit;
|
||||
return_value = bytes_decode_impl(self, encoding, errors);
|
||||
|
@ -456,8 +447,7 @@ bytes_splitlines(PyBytesObject*self, PyObject *args, PyObject *kwargs)
|
|||
static char *_keywords[] = {"keepends", NULL};
|
||||
int keepends = 0;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"|i:splitlines", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:splitlines", _keywords,
|
||||
&keepends))
|
||||
goto exit;
|
||||
return_value = bytes_splitlines_impl(self, keepends);
|
||||
|
@ -487,13 +477,11 @@ bytes_fromhex(PyTypeObject *type, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *string;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:fromhex",
|
||||
&string))
|
||||
if (!PyArg_Parse(arg, "U:fromhex", &string))
|
||||
goto exit;
|
||||
return_value = bytes_fromhex_impl(type, string);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=deaf886e15270679 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=bd0ce8f25d7e18f4 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -30,8 +30,7 @@ unicode_maketrans(void *null, PyObject *args)
|
|||
PyObject *y = NULL;
|
||||
PyObject *z = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|UU:maketrans",
|
||||
if (!PyArg_ParseTuple(args, "O|UU:maketrans",
|
||||
&x, &y, &z))
|
||||
goto exit;
|
||||
return_value = unicode_maketrans_impl(x, y, z);
|
||||
|
@ -39,4 +38,4 @@ unicode_maketrans(void *null, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=4670413843c53055 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=94affdff5b2daff5 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -93,8 +93,7 @@ builtin_format(PyModuleDef *module, PyObject *args)
|
|||
PyObject *value;
|
||||
PyObject *format_spec = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O|U:format",
|
||||
if (!PyArg_ParseTuple(args, "O|U:format",
|
||||
&value, &format_spec))
|
||||
goto exit;
|
||||
return_value = builtin_format_impl(module, value, format_spec);
|
||||
|
@ -121,9 +120,7 @@ builtin_chr(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
int i;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"i:chr",
|
||||
&i))
|
||||
if (!PyArg_Parse(arg, "i:chr", &i))
|
||||
goto exit;
|
||||
return_value = builtin_chr_impl(module, i);
|
||||
|
||||
|
@ -169,8 +166,7 @@ builtin_compile(PyModuleDef *module, PyObject *args, PyObject *kwargs)
|
|||
int dont_inherit = 0;
|
||||
int optimize = -1;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"OO&s|iii:compile", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO&s|iii:compile", _keywords,
|
||||
&source, PyUnicode_FSDecoder, &filename, &mode, &flags, &dont_inherit, &optimize))
|
||||
goto exit;
|
||||
return_value = builtin_compile_impl(module, source, filename, mode, flags, dont_inherit, optimize);
|
||||
|
@ -664,4 +660,4 @@ builtin_issubclass(PyModuleDef *module, PyObject *args)
|
|||
exit:
|
||||
return return_value;
|
||||
}
|
||||
/*[clinic end generated code: output=b308ab64aa4d4ff8 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=9b34d1ca57effad8 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -88,8 +88,7 @@ _imp__fix_co_filename(PyModuleDef *module, PyObject *args)
|
|||
PyCodeObject *code;
|
||||
PyObject *path;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"O!U:_fix_co_filename",
|
||||
if (!PyArg_ParseTuple(args, "O!U:_fix_co_filename",
|
||||
&PyCode_Type, &code, &path))
|
||||
goto exit;
|
||||
return_value = _imp__fix_co_filename_impl(module, code, path);
|
||||
|
@ -134,9 +133,7 @@ _imp_init_builtin(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:init_builtin",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:init_builtin", &name))
|
||||
goto exit;
|
||||
return_value = _imp_init_builtin_impl(module, name);
|
||||
|
||||
|
@ -162,9 +159,7 @@ _imp_init_frozen(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:init_frozen",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:init_frozen", &name))
|
||||
goto exit;
|
||||
return_value = _imp_init_frozen_impl(module, name);
|
||||
|
||||
|
@ -190,9 +185,7 @@ _imp_get_frozen_object(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:get_frozen_object",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:get_frozen_object", &name))
|
||||
goto exit;
|
||||
return_value = _imp_get_frozen_object_impl(module, name);
|
||||
|
||||
|
@ -218,9 +211,7 @@ _imp_is_frozen_package(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:is_frozen_package",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:is_frozen_package", &name))
|
||||
goto exit;
|
||||
return_value = _imp_is_frozen_package_impl(module, name);
|
||||
|
||||
|
@ -246,9 +237,7 @@ _imp_is_builtin(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:is_builtin",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:is_builtin", &name))
|
||||
goto exit;
|
||||
return_value = _imp_is_builtin_impl(module, name);
|
||||
|
||||
|
@ -274,9 +263,7 @@ _imp_is_frozen(PyModuleDef *module, PyObject *arg)
|
|||
PyObject *return_value = NULL;
|
||||
PyObject *name;
|
||||
|
||||
if (!PyArg_Parse(arg,
|
||||
"U:is_frozen",
|
||||
&name))
|
||||
if (!PyArg_Parse(arg, "U:is_frozen", &name))
|
||||
goto exit;
|
||||
return_value = _imp_is_frozen_impl(module, name);
|
||||
|
||||
|
@ -307,8 +294,7 @@ _imp_load_dynamic(PyModuleDef *module, PyObject *args)
|
|||
PyObject *path;
|
||||
PyObject *file = NULL;
|
||||
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"UO&|O:load_dynamic",
|
||||
if (!PyArg_ParseTuple(args, "UO&|O:load_dynamic",
|
||||
&name, PyUnicode_FSDecoder, &path, &file))
|
||||
goto exit;
|
||||
return_value = _imp_load_dynamic_impl(module, name, path, file);
|
||||
|
@ -322,4 +308,4 @@ exit:
|
|||
#ifndef _IMP_LOAD_DYNAMIC_METHODDEF
|
||||
#define _IMP_LOAD_DYNAMIC_METHODDEF
|
||||
#endif /* !defined(_IMP_LOAD_DYNAMIC_METHODDEF) */
|
||||
/*[clinic end generated code: output=b64fe33fe76591cf input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=6d75cece35863874 input=a9049054013a1b77]*/
|
||||
|
|
|
@ -786,9 +786,7 @@ class CLanguage(Language):
|
|||
""" % argname)
|
||||
|
||||
parser_definition = parser_body(parser_prototype, normalize_snippet("""
|
||||
if (!PyArg_Parse(%s,
|
||||
"{format_units}:{name}",
|
||||
{parse_arguments}))
|
||||
if (!PyArg_Parse(%s, "{format_units}:{name}", {parse_arguments}))
|
||||
goto exit;
|
||||
""" % argname, indent=4))
|
||||
|
||||
|
@ -825,8 +823,7 @@ class CLanguage(Language):
|
|||
parser_prototype = parser_prototype_varargs
|
||||
|
||||
parser_definition = parser_body(parser_prototype, normalize_snippet("""
|
||||
if (!PyArg_ParseTuple(args,
|
||||
"{format_units}:{name}",
|
||||
if (!PyArg_ParseTuple(args, "{format_units}:{name}",
|
||||
{parse_arguments}))
|
||||
goto exit;
|
||||
""", indent=4))
|
||||
|
@ -838,14 +835,12 @@ class CLanguage(Language):
|
|||
parser_prototype = parser_prototype_keyword
|
||||
|
||||
body = normalize_snippet("""
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"{format_units}:{name}", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
|
||||
{parse_arguments}))
|
||||
goto exit;
|
||||
""", indent=4)
|
||||
parser_definition = parser_body(parser_prototype, normalize_snippet("""
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
|
||||
"{format_units}:{name}", _keywords,
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "{format_units}:{name}", _keywords,
|
||||
{parse_arguments}))
|
||||
goto exit;
|
||||
""", indent=4))
|
||||
|
|
Loading…
Reference in New Issue