diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 21:12:11 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-04-03 21:12:11 (GMT) |
commit | 92e8af67a89b204efedad3373c292c0b3c52072c (patch) | |
tree | 0e319cfdf2015aedc0e932c2a30ad71734aa0824 /Modules/clinic/zlibmodule.c.h | |
parent | 1009bf18b38a8d36298575191dd8fdf43f8f9097 (diff) | |
download | cpython-92e8af67a89b204efedad3373c292c0b3c52072c.zip cpython-92e8af67a89b204efedad3373c292c0b3c52072c.tar.gz cpython-92e8af67a89b204efedad3373c292c0b3c52072c.tar.bz2 |
Issue #23492: Argument Clinic now generates argument parsing code with
PyArg_Parse instead of PyArg_ParseTuple if possible.
Diffstat (limited to 'Modules/clinic/zlibmodule.c.h')
-rw-r--r-- | Modules/clinic/zlibmodule.c.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index 267498e..2fb4809 100644 --- a/Modules/clinic/zlibmodule.c.h +++ b/Modules/clinic/zlibmodule.c.h @@ -189,18 +189,18 @@ PyDoc_STRVAR(zlib_Compress_compress__doc__, "Call the flush() method to clear these buffers."); #define ZLIB_COMPRESS_COMPRESS_METHODDEF \ - {"compress", (PyCFunction)zlib_Compress_compress, METH_VARARGS, zlib_Compress_compress__doc__}, + {"compress", (PyCFunction)zlib_Compress_compress, METH_O, zlib_Compress_compress__doc__}, static PyObject * zlib_Compress_compress_impl(compobject *self, Py_buffer *data); static PyObject * -zlib_Compress_compress(compobject *self, PyObject *args) +zlib_Compress_compress(compobject *self, PyObject *arg) { PyObject *return_value = NULL; Py_buffer data = {NULL, NULL}; - if (!PyArg_ParseTuple(args, + if (!PyArg_Parse(arg, "y*:compress", &data)) goto exit; @@ -446,4 +446,4 @@ exit: #ifndef ZLIB_COMPRESS_COPY_METHODDEF #define ZLIB_COMPRESS_COPY_METHODDEF #endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */ -/*[clinic end generated code: output=901c18189767dc08 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0743b1aa908f0b68 input=a9049054013a1b77]*/ |