diff options
Diffstat (limited to 'Modules/clinic/zlibmodule.c.h')
-rw-r--r-- | Modules/clinic/zlibmodule.c.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/Modules/clinic/zlibmodule.c.h b/Modules/clinic/zlibmodule.c.h index f54a805..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; @@ -314,10 +314,6 @@ zlib_Compress_copy(compobject *self, PyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_ZLIB_COPY) */ -#ifndef ZLIB_COMPRESS_COPY_METHODDEF - #define ZLIB_COMPRESS_COPY_METHODDEF -#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */ - #if defined(HAVE_ZLIB_COPY) PyDoc_STRVAR(zlib_Decompress_copy__doc__, @@ -340,10 +336,6 @@ zlib_Decompress_copy(compobject *self, PyObject *Py_UNUSED(ignored)) #endif /* defined(HAVE_ZLIB_COPY) */ -#ifndef ZLIB_DECOMPRESS_COPY_METHODDEF - #define ZLIB_DECOMPRESS_COPY_METHODDEF -#endif /* !defined(ZLIB_DECOMPRESS_COPY_METHODDEF) */ - PyDoc_STRVAR(zlib_Decompress_flush__doc__, "flush($self, length=zlib.DEF_BUF_SIZE, /)\n" "--\n" @@ -450,4 +442,8 @@ exit: return return_value; } -/*[clinic end generated code: output=bc9473721ca7c962 input=a9049054013a1b77]*/ + +#ifndef ZLIB_COMPRESS_COPY_METHODDEF + #define ZLIB_COMPRESS_COPY_METHODDEF +#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */ +/*[clinic end generated code: output=0743b1aa908f0b68 input=a9049054013a1b77]*/ |