Skip to content

Commit ec406fe

Browse files
Issue python#27810: Regenerate Argument Clinic.
1 parent e084f84 commit ec406fe

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

Modules/_io/clinic/_iomodule.c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ PyDoc_STRVAR(_io_open__doc__,
127127
"opened in a binary mode.");
128128

129129
#define _IO_OPEN_METHODDEF \
130-
{"open", (PyCFunction)_io_open, METH_VARARGS|METH_KEYWORDS, _io_open__doc__},
130+
{"open", (PyCFunction)_io_open, METH_FASTCALL, _io_open__doc__},
131131

132132
static PyObject *
133133
_io_open_impl(PyObject *module, PyObject *file, const char *mode,
134134
int buffering, const char *encoding, const char *errors,
135135
const char *newline, int closefd, PyObject *opener);
136136

137137
static PyObject *
138-
_io_open(PyObject *module, PyObject *args, PyObject *kwargs)
138+
_io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
139139
{
140140
PyObject *return_value = NULL;
141141
static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
@@ -149,7 +149,7 @@ _io_open(PyObject *module, PyObject *args, PyObject *kwargs)
149149
int closefd = 1;
150150
PyObject *opener = Py_None;
151151

152-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
152+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
153153
&file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener)) {
154154
goto exit;
155155
}
@@ -158,4 +158,4 @@ _io_open(PyObject *module, PyObject *args, PyObject *kwargs)
158158
exit:
159159
return return_value;
160160
}
161-
/*[clinic end generated code: output=14769629391a3130 input=a9049054013a1b77]*/
161+
/*[clinic end generated code: output=c5b8fc8b83102bbf input=a9049054013a1b77]*/

Modules/_io/clinic/textio.c.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,22 @@ PyDoc_STRVAR(_io_IncrementalNewlineDecoder_decode__doc__,
4646
"\n");
4747

4848
#define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF \
49-
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_VARARGS|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
49+
{"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL, _io_IncrementalNewlineDecoder_decode__doc__},
5050

5151
static PyObject *
5252
_io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
5353
PyObject *input, int final);
5454

5555
static PyObject *
56-
_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *args, PyObject *kwargs)
56+
_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
5757
{
5858
PyObject *return_value = NULL;
5959
static const char * const _keywords[] = {"input", "final", NULL};
6060
static _PyArg_Parser _parser = {"O|i:decode", _keywords, 0};
6161
PyObject *input;
6262
int final = 0;
6363

64-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
64+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
6565
&input, &final)) {
6666
goto exit;
6767
}
@@ -464,4 +464,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored))
464464
{
465465
return _io_TextIOWrapper_close_impl(self);
466466
}
467-
/*[clinic end generated code: output=7ec624a9bf6393f5 input=a9049054013a1b77]*/
467+
/*[clinic end generated code: output=78ad14eba1667254 input=a9049054013a1b77]*/

Modules/_sha3/clinic/sha3module.c.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ PyDoc_STRVAR(_sha3_shake_128_digest__doc__,
9999
"Return the digest value as a string of binary data.");
100100

101101
#define _SHA3_SHAKE_128_DIGEST_METHODDEF \
102-
{"digest", (PyCFunction)_sha3_shake_128_digest, METH_VARARGS|METH_KEYWORDS, _sha3_shake_128_digest__doc__},
102+
{"digest", (PyCFunction)_sha3_shake_128_digest, METH_FASTCALL, _sha3_shake_128_digest__doc__},
103103

104104
static PyObject *
105105
_sha3_shake_128_digest_impl(SHA3object *self, unsigned long length);
106106

107107
static PyObject *
108-
_sha3_shake_128_digest(SHA3object *self, PyObject *args, PyObject *kwargs)
108+
_sha3_shake_128_digest(SHA3object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
109109
{
110110
PyObject *return_value = NULL;
111111
static const char * const _keywords[] = {"length", NULL};
112112
static _PyArg_Parser _parser = {"k:digest", _keywords, 0};
113113
unsigned long length;
114114

115-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
115+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
116116
&length)) {
117117
goto exit;
118118
}
@@ -129,20 +129,20 @@ PyDoc_STRVAR(_sha3_shake_128_hexdigest__doc__,
129129
"Return the digest value as a string of hexadecimal digits.");
130130

131131
#define _SHA3_SHAKE_128_HEXDIGEST_METHODDEF \
132-
{"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_VARARGS|METH_KEYWORDS, _sha3_shake_128_hexdigest__doc__},
132+
{"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_FASTCALL, _sha3_shake_128_hexdigest__doc__},
133133

134134
static PyObject *
135135
_sha3_shake_128_hexdigest_impl(SHA3object *self, unsigned long length);
136136

137137
static PyObject *
138-
_sha3_shake_128_hexdigest(SHA3object *self, PyObject *args, PyObject *kwargs)
138+
_sha3_shake_128_hexdigest(SHA3object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
139139
{
140140
PyObject *return_value = NULL;
141141
static const char * const _keywords[] = {"length", NULL};
142142
static _PyArg_Parser _parser = {"k:hexdigest", _keywords, 0};
143143
unsigned long length;
144144

145-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
145+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
146146
&length)) {
147147
goto exit;
148148
}
@@ -151,4 +151,4 @@ _sha3_shake_128_hexdigest(SHA3object *self, PyObject *args, PyObject *kwargs)
151151
exit:
152152
return return_value;
153153
}
154-
/*[clinic end generated code: output=50cff05f2c74d41e input=a9049054013a1b77]*/
154+
/*[clinic end generated code: output=9888beab45136a56 input=a9049054013a1b77]*/

Modules/cjkcodecs/clinic/multibytecodec.c.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ PyDoc_STRVAR(_multibytecodec_MultibyteCodec_encode__doc__,
1414
"registered with codecs.register_error that can handle UnicodeEncodeErrors.");
1515

1616
#define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
17-
{"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
17+
{"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_FASTCALL, _multibytecodec_MultibyteCodec_encode__doc__},
1818

1919
static PyObject *
2020
_multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
2121
PyObject *input,
2222
const char *errors);
2323

2424
static PyObject *
25-
_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
25+
_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
2626
{
2727
PyObject *return_value = NULL;
2828
static const char * const _keywords[] = {"input", "errors", NULL};
2929
static _PyArg_Parser _parser = {"O|z:encode", _keywords, 0};
3030
PyObject *input;
3131
const char *errors = NULL;
3232

33-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
33+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
3434
&input, &errors)) {
3535
goto exit;
3636
}
@@ -52,23 +52,23 @@ PyDoc_STRVAR(_multibytecodec_MultibyteCodec_decode__doc__,
5252
"codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
5353

5454
#define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
55-
{"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_decode__doc__},
55+
{"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_FASTCALL, _multibytecodec_MultibyteCodec_decode__doc__},
5656

5757
static PyObject *
5858
_multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
5959
Py_buffer *input,
6060
const char *errors);
6161

6262
static PyObject *
63-
_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
63+
_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
6464
{
6565
PyObject *return_value = NULL;
6666
static const char * const _keywords[] = {"input", "errors", NULL};
6767
static _PyArg_Parser _parser = {"y*|z:decode", _keywords, 0};
6868
Py_buffer input = {NULL, NULL};
6969
const char *errors = NULL;
7070

71-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
71+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
7272
&input, &errors)) {
7373
goto exit;
7474
}
@@ -89,23 +89,23 @@ PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalEncoder_encode__doc__,
8989
"\n");
9090

9191
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF \
92-
{"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
92+
{"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
9393

9494
static PyObject *
9595
_multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
9696
PyObject *input,
9797
int final);
9898

9999
static PyObject *
100-
_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject *args, PyObject *kwargs)
100+
_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
101101
{
102102
PyObject *return_value = NULL;
103103
static const char * const _keywords[] = {"input", "final", NULL};
104104
static _PyArg_Parser _parser = {"O|i:encode", _keywords, 0};
105105
PyObject *input;
106106
int final = 0;
107107

108-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
108+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
109109
&input, &final)) {
110110
goto exit;
111111
}
@@ -138,23 +138,23 @@ PyDoc_STRVAR(_multibytecodec_MultibyteIncrementalDecoder_decode__doc__,
138138
"\n");
139139

140140
#define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF \
141-
{"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
141+
{"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
142142

143143
static PyObject *
144144
_multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
145145
Py_buffer *input,
146146
int final);
147147

148148
static PyObject *
149-
_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject *args, PyObject *kwargs)
149+
_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
150150
{
151151
PyObject *return_value = NULL;
152152
static const char * const _keywords[] = {"input", "final", NULL};
153153
static _PyArg_Parser _parser = {"y*|i:decode", _keywords, 0};
154154
Py_buffer input = {NULL, NULL};
155155
int final = 0;
156156

157-
if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
157+
if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
158158
&input, &final)) {
159159
goto exit;
160160
}
@@ -330,4 +330,4 @@ PyDoc_STRVAR(_multibytecodec___create_codec__doc__,
330330

331331
#define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
332332
{"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
333-
/*[clinic end generated code: output=8e86fa162c85230b input=a9049054013a1b77]*/
333+
/*[clinic end generated code: output=134b9e36cb985939 input=a9049054013a1b77]*/

0 commit comments

Comments
 (0)