@@ -971,30 +971,23 @@ PyDoc_STRVAR(isal_zlib_Decompress_decompress__doc__,
971
971
"Call the flush() method to clear these buffers." );
972
972
973
973
#define ISAL_ZLIB_DECOMPRESS_DECOMPRESS_METHODDEF \
974
- {"decompress", (PyCFunction)(void(*)(void))isal_zlib_Decompress_decompress, METH_FASTCALL |METH_KEYWORDS, isal_zlib_Decompress_decompress__doc__}
974
+ {"decompress", (PyCFunction)(void(*)(void))isal_zlib_Decompress_decompress, METH_VARARGS |METH_KEYWORDS, isal_zlib_Decompress_decompress__doc__}
975
975
976
976
977
977
static PyObject *
978
- isal_zlib_Decompress_decompress (decompobject * self , PyObject * const * args , Py_ssize_t nargs , PyObject * kwnames )
978
+ isal_zlib_Decompress_decompress (decompobject * self , PyObject * args , PyObject * kwargs )
979
979
{
980
- PyObject * return_value = NULL ;
981
- static const char * const _keywords [] = { "" , "max_length" , NULL } ;
982
- static _PyArg_Parser _parser = { "y*|n:decompress" , _keywords , 0 };
980
+ char * keywords [] = { "" , "max_length" , NULL } ;
981
+ char * format = "y*|n:decompress" ;
982
+
983
983
Py_buffer data = {NULL , NULL };
984
984
Py_ssize_t max_length = 0 ;
985
-
986
- if (!_PyArg_ParseStackAndKeywords (args , nargs , kwnames , & _parser ,
987
- & data , & max_length )) {
988
- goto exit ;
989
- }
990
- return_value = isal_zlib_Decompress_decompress_impl (self , & data , max_length );
991
-
992
- exit :
993
- /* Cleanup for data */
994
- if (data .obj ) {
995
- PyBuffer_Release (& data );
985
+ if (!PyArg_ParseTupleAndKeywords (
986
+ args , kwargs , format , keywords , & data , & max_length )) {
987
+ return NULL ;
996
988
}
997
-
989
+ PyObject * return_value = isal_zlib_Decompress_decompress_impl (self , & data , max_length );
990
+ PyBuffer_Release (& data );
998
991
return return_value ;
999
992
}
1000
993
0 commit comments