[Python-checkins] cpython: Issue #27810: Regenerate Argument Clinic.

serhiy.storchaka python-checkins at python.org
Sun Sep 11 14:28:51 EDT 2016


https://hg.python.org/cpython/rev/603bef7bb744
changeset: 103647:603bef7bb744
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Sep 11 21:25:45 2016 +0300
summary:
 Issue #27810: Regenerate Argument Clinic.
files:
 Modules/_io/clinic/_iomodule.c.h | 8 +-
 Modules/_io/clinic/textio.c.h | 8 +-
 Modules/_sha3/clinic/sha3module.c.h | 14 ++--
 Modules/cjkcodecs/clinic/multibytecodec.c.h | 26 +++++-----
 4 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h
--- a/Modules/_io/clinic/_iomodule.c.h
+++ b/Modules/_io/clinic/_iomodule.c.h
@@ -127,7 +127,7 @@
 "opened in a binary mode.");
 
 #define _IO_OPEN_METHODDEF \
- {"open", (PyCFunction)_io_open, METH_VARARGS|METH_KEYWORDS, _io_open__doc__},
+ {"open", (PyCFunction)_io_open, METH_FASTCALL, _io_open__doc__},
 
 static PyObject *
 _io_open_impl(PyObject *module, PyObject *file, const char *mode,
@@ -135,7 +135,7 @@
 const char *newline, int closefd, PyObject *opener);
 
 static PyObject *
-_io_open(PyObject *module, PyObject *args, PyObject *kwargs)
+_io_open(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"file", "mode", "buffering", "encoding", "errors", "newline", "closefd", "opener", NULL};
@@ -149,7 +149,7 @@
 int closefd = 1;
 PyObject *opener = Py_None;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &file, &mode, &buffering, &encoding, &errors, &newline, &closefd, &opener)) {
 goto exit;
 }
@@ -158,4 +158,4 @@
 exit:
 return return_value;
 }
-/*[clinic end generated code: output=14769629391a3130 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c5b8fc8b83102bbf input=a9049054013a1b77]*/
diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h
--- a/Modules/_io/clinic/textio.c.h
+++ b/Modules/_io/clinic/textio.c.h
@@ -46,14 +46,14 @@
 "\n");
 
 #define _IO_INCREMENTALNEWLINEDECODER_DECODE_METHODDEF \
- {"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_VARARGS|METH_KEYWORDS, _io_IncrementalNewlineDecoder_decode__doc__},
+ {"decode", (PyCFunction)_io_IncrementalNewlineDecoder_decode, METH_FASTCALL, _io_IncrementalNewlineDecoder_decode__doc__},
 
 static PyObject *
 _io_IncrementalNewlineDecoder_decode_impl(nldecoder_object *self,
 PyObject *input, int final);
 
 static PyObject *
-_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject *args, PyObject *kwargs)
+_io_IncrementalNewlineDecoder_decode(nldecoder_object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"input", "final", NULL};
@@ -61,7 +61,7 @@
 PyObject *input;
 int final = 0;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &input, &final)) {
 goto exit;
 }
@@ -464,4 +464,4 @@
 {
 return _io_TextIOWrapper_close_impl(self);
 }
-/*[clinic end generated code: output=7ec624a9bf6393f5 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=78ad14eba1667254 input=a9049054013a1b77]*/
diff --git a/Modules/_sha3/clinic/sha3module.c.h b/Modules/_sha3/clinic/sha3module.c.h
--- a/Modules/_sha3/clinic/sha3module.c.h
+++ b/Modules/_sha3/clinic/sha3module.c.h
@@ -99,20 +99,20 @@
 "Return the digest value as a string of binary data.");
 
 #define _SHA3_SHAKE_128_DIGEST_METHODDEF \
- {"digest", (PyCFunction)_sha3_shake_128_digest, METH_VARARGS|METH_KEYWORDS, _sha3_shake_128_digest__doc__},
+ {"digest", (PyCFunction)_sha3_shake_128_digest, METH_FASTCALL, _sha3_shake_128_digest__doc__},
 
 static PyObject *
 _sha3_shake_128_digest_impl(SHA3object *self, unsigned long length);
 
 static PyObject *
-_sha3_shake_128_digest(SHA3object *self, PyObject *args, PyObject *kwargs)
+_sha3_shake_128_digest(SHA3object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"length", NULL};
 static _PyArg_Parser _parser = {"k:digest", _keywords, 0};
 unsigned long length;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &length)) {
 goto exit;
 }
@@ -129,20 +129,20 @@
 "Return the digest value as a string of hexadecimal digits.");
 
 #define _SHA3_SHAKE_128_HEXDIGEST_METHODDEF \
- {"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_VARARGS|METH_KEYWORDS, _sha3_shake_128_hexdigest__doc__},
+ {"hexdigest", (PyCFunction)_sha3_shake_128_hexdigest, METH_FASTCALL, _sha3_shake_128_hexdigest__doc__},
 
 static PyObject *
 _sha3_shake_128_hexdigest_impl(SHA3object *self, unsigned long length);
 
 static PyObject *
-_sha3_shake_128_hexdigest(SHA3object *self, PyObject *args, PyObject *kwargs)
+_sha3_shake_128_hexdigest(SHA3object *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"length", NULL};
 static _PyArg_Parser _parser = {"k:hexdigest", _keywords, 0};
 unsigned long length;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &length)) {
 goto exit;
 }
@@ -151,4 +151,4 @@
 exit:
 return return_value;
 }
-/*[clinic end generated code: output=50cff05f2c74d41e input=a9049054013a1b77]*/
+/*[clinic end generated code: output=9888beab45136a56 input=a9049054013a1b77]*/
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h
--- a/Modules/cjkcodecs/clinic/multibytecodec.c.h
+++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h
@@ -14,7 +14,7 @@
 "registered with codecs.register_error that can handle UnicodeEncodeErrors.");
 
 #define _MULTIBYTECODEC_MULTIBYTECODEC_ENCODE_METHODDEF \
- {"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_encode__doc__},
+ {"encode", (PyCFunction)_multibytecodec_MultibyteCodec_encode, METH_FASTCALL, _multibytecodec_MultibyteCodec_encode__doc__},
 
 static PyObject *
 _multibytecodec_MultibyteCodec_encode_impl(MultibyteCodecObject *self,
@@ -22,7 +22,7 @@
 const char *errors);
 
 static PyObject *
-_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteCodec_encode(MultibyteCodecObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"input", "errors", NULL};
@@ -30,7 +30,7 @@
 PyObject *input;
 const char *errors = NULL;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &input, &errors)) {
 goto exit;
 }
@@ -52,7 +52,7 @@
 "codecs.register_error that is able to handle UnicodeDecodeErrors.\"");
 
 #define _MULTIBYTECODEC_MULTIBYTECODEC_DECODE_METHODDEF \
- {"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteCodec_decode__doc__},
+ {"decode", (PyCFunction)_multibytecodec_MultibyteCodec_decode, METH_FASTCALL, _multibytecodec_MultibyteCodec_decode__doc__},
 
 static PyObject *
 _multibytecodec_MultibyteCodec_decode_impl(MultibyteCodecObject *self,
@@ -60,7 +60,7 @@
 const char *errors);
 
 static PyObject *
-_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteCodec_decode(MultibyteCodecObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"input", "errors", NULL};
@@ -68,7 +68,7 @@
 Py_buffer input = {NULL, NULL};
 const char *errors = NULL;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &input, &errors)) {
 goto exit;
 }
@@ -89,7 +89,7 @@
 "\n");
 
 #define _MULTIBYTECODEC_MULTIBYTEINCREMENTALENCODER_ENCODE_METHODDEF \
- {"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
+ {"encode", (PyCFunction)_multibytecodec_MultibyteIncrementalEncoder_encode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalEncoder_encode__doc__},
 
 static PyObject *
 _multibytecodec_MultibyteIncrementalEncoder_encode_impl(MultibyteIncrementalEncoderObject *self,
@@ -97,7 +97,7 @@
 int final);
 
 static PyObject *
-_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteIncrementalEncoder_encode(MultibyteIncrementalEncoderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"input", "final", NULL};
@@ -105,7 +105,7 @@
 PyObject *input;
 int final = 0;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &input, &final)) {
 goto exit;
 }
@@ -138,7 +138,7 @@
 "\n");
 
 #define _MULTIBYTECODEC_MULTIBYTEINCREMENTALDECODER_DECODE_METHODDEF \
- {"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_VARARGS|METH_KEYWORDS, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
+ {"decode", (PyCFunction)_multibytecodec_MultibyteIncrementalDecoder_decode, METH_FASTCALL, _multibytecodec_MultibyteIncrementalDecoder_decode__doc__},
 
 static PyObject *
 _multibytecodec_MultibyteIncrementalDecoder_decode_impl(MultibyteIncrementalDecoderObject *self,
@@ -146,7 +146,7 @@
 int final);
 
 static PyObject *
-_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject *args, PyObject *kwargs)
+_multibytecodec_MultibyteIncrementalDecoder_decode(MultibyteIncrementalDecoderObject *self, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
 {
 PyObject *return_value = NULL;
 static const char * const _keywords[] = {"input", "final", NULL};
@@ -154,7 +154,7 @@
 Py_buffer input = {NULL, NULL};
 int final = 0;
 
- if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
+ if (!_PyArg_ParseStack(args, nargs, kwnames, &_parser,
 &input, &final)) {
 goto exit;
 }
@@ -330,4 +330,4 @@
 
 #define _MULTIBYTECODEC___CREATE_CODEC_METHODDEF \
 {"__create_codec", (PyCFunction)_multibytecodec___create_codec, METH_O, _multibytecodec___create_codec__doc__},
-/*[clinic end generated code: output=8e86fa162c85230b input=a9049054013a1b77]*/
+/*[clinic end generated code: output=134b9e36cb985939 input=a9049054013a1b77]*/
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /