@@ -44,7 +44,7 @@ zlib_compress(PyObject *module, PyObject *args, PyObject *kwargs)
4444}
4545
4646PyDoc_STRVAR (zlib_decompress__doc__ ,
47- "decompress($module, data, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE, / )\n"
47+ "decompress($module, data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)\n"
4848"--\n"
4949"\n"
5050"Returns a bytes object containing the uncompressed data.\n"
@@ -57,21 +57,23 @@ PyDoc_STRVAR(zlib_decompress__doc__,
5757" The initial output buffer size." );
5858
5959#define ZLIB_DECOMPRESS_METHODDEF \
60- {"decompress", (PyCFunction)zlib_decompress, METH_VARARGS, zlib_decompress__doc__},
60+ {"decompress", (PyCFunction)zlib_decompress, METH_VARARGS|METH_KEYWORDS , zlib_decompress__doc__},
6161
6262static PyObject *
6363zlib_decompress_impl (PyObject * module , Py_buffer * data , int wbits ,
6464 Py_ssize_t bufsize );
6565
6666static PyObject *
67- zlib_decompress (PyObject * module , PyObject * args )
67+ zlib_decompress (PyObject * module , PyObject * args , PyObject * kwargs )
6868{
6969 PyObject * return_value = NULL ;
70+ static const char * const _keywords [] = {"" , "wbits" , "bufsize" , NULL };
71+ static _PyArg_Parser _parser = {"y*|iO&:decompress" , _keywords , 0 };
7072 Py_buffer data = {NULL , NULL };
7173 int wbits = MAX_WBITS ;
7274 Py_ssize_t bufsize = DEF_BUF_SIZE ;
7375
74- if (!PyArg_ParseTuple (args , "y*|iO&:decompress" ,
76+ if (!_PyArg_ParseTupleAndKeywordsFast (args , kwargs , & _parser ,
7577 & data , & wbits , ssize_t_converter , & bufsize )) {
7678 goto exit ;
7779 }
@@ -228,7 +230,7 @@ zlib_Compress_compress(compobject *self, PyObject *arg)
228230}
229231
230232PyDoc_STRVAR (zlib_Decompress_decompress__doc__ ,
231- "decompress($self, data, max_length=0, / )\n"
233+ "decompress($self, data, /, max_length=0)\n"
232234"--\n"
233235"\n"
234236"Return a bytes object containing the decompressed version of the data.\n"
@@ -245,20 +247,22 @@ PyDoc_STRVAR(zlib_Decompress_decompress__doc__,
245247"Call the flush() method to clear these buffers." );
246248
247249#define ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
248- {"decompress", (PyCFunction)zlib_Decompress_decompress, METH_VARARGS, zlib_Decompress_decompress__doc__},
250+ {"decompress", (PyCFunction)zlib_Decompress_decompress, METH_VARARGS|METH_KEYWORDS , zlib_Decompress_decompress__doc__},
249251
250252static PyObject *
251253zlib_Decompress_decompress_impl (compobject * self , Py_buffer * data ,
252254 Py_ssize_t max_length );
253255
254256static PyObject *
255- zlib_Decompress_decompress (compobject * self , PyObject * args )
257+ zlib_Decompress_decompress (compobject * self , PyObject * args , PyObject * kwargs )
256258{
257259 PyObject * return_value = NULL ;
260+ static const char * const _keywords [] = {"" , "max_length" , NULL };
261+ static _PyArg_Parser _parser = {"y*|O&:decompress" , _keywords , 0 };
258262 Py_buffer data = {NULL , NULL };
259263 Py_ssize_t max_length = 0 ;
260264
261- if (!PyArg_ParseTuple (args , "y*|O&:decompress" ,
265+ if (!_PyArg_ParseTupleAndKeywordsFast (args , kwargs , & _parser ,
262266 & data , ssize_t_converter , & max_length )) {
263267 goto exit ;
264268 }
@@ -463,4 +467,4 @@ zlib_crc32(PyObject *module, PyObject *args)
463467#ifndef ZLIB_COMPRESS_COPY_METHODDEF
464468 #define ZLIB_COMPRESS_COPY_METHODDEF
465469#endif /* !defined(ZLIB_COMPRESS_COPY_METHODDEF) */
466- /*[clinic end generated code: output=1fed251c15a9bffa input=a9049054013a1b77]*/
470+ /*[clinic end generated code: output=48911ef429b65903 input=a9049054013a1b77]*/
0 commit comments