diff options
Diffstat (limited to 'Modules/cjkcodecs/clinic/multibytecodec.c.h')
-rw-r--r-- | Modules/cjkcodecs/clinic/multibytecodec.c.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/Modules/cjkcodecs/clinic/multibytecodec.c.h b/Modules/cjkcodecs/clinic/multibytecodec.c.h index 871bf33..c62a641 100644 --- a/Modules/cjkcodecs/clinic/multibytecodec.c.h +++ b/Modules/cjkcodecs/clinic/multibytecodec.c.h @@ -296,11 +296,14 @@ _multibytecodec_MultibyteStreamReader_read(MultibyteStreamReaderObject *self, Py PyObject *return_value = NULL; PyObject *sizeobj = Py_None; - if (!_PyArg_UnpackStack(args, nargs, "read", - 0, 1, - &sizeobj)) { + if (!_PyArg_CheckPositional("read", nargs, 0, 1)) { goto exit; } + if (nargs < 1) { + goto skip_optional; + } + sizeobj = args[0]; +skip_optional: return_value = _multibytecodec_MultibyteStreamReader_read_impl(self, sizeobj); exit: @@ -325,11 +328,14 @@ _multibytecodec_MultibyteStreamReader_readline(MultibyteStreamReaderObject *self PyObject *return_value = NULL; PyObject *sizeobj = Py_None; - if (!_PyArg_UnpackStack(args, nargs, "readline", - 0, 1, - &sizeobj)) { + if (!_PyArg_CheckPositional("readline", nargs, 0, 1)) { goto exit; } + if (nargs < 1) { + goto skip_optional; + } + sizeobj = args[0]; +skip_optional: return_value = _multibytecodec_MultibyteStreamReader_readline_impl(self, sizeobj); exit: @@ -354,11 +360,14 @@ _multibytecodec_MultibyteStreamReader_readlines(MultibyteStreamReaderObject *sel PyObject *return_value = NULL; PyObject *sizehintobj = Py_None; - if (!_PyArg_UnpackStack(args, nargs, "readlines", - 0, 1, - &sizehintobj)) { + if (!_PyArg_CheckPositional("readlines", nargs, 0, 1)) { goto exit; } + if (nargs < 1) { + goto skip_optional; + } + sizehintobj = args[0]; +skip_optional: return_value = _multibytecodec_MultibyteStreamReader_readlines_impl(self, sizehintobj); exit: @@ -422,4 +431,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=2ed7030b28a79029 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=bcd6311010557faf input=a9049054013a1b77]*/ |