@@ -610,7 +610,7 @@ PyZlib_unflush(compobject *self, PyObject *args)
610610 int length = 0 , err ;
611611 PyObject * RetVal ;
612612
613- if (!PyArg_NoArgs (args ))
613+ if (!PyArg_ParseTuple (args , "" ))
614614 return NULL ;
615615 if (!(RetVal = PyString_FromStringAndSize (NULL , DEFAULTALLOC )))
616616 {
@@ -675,15 +675,19 @@ PyZlib_unflush(compobject *self, PyObject *args)
675675
676676static PyMethodDef comp_methods [] =
677677{
678- {"compress" , (binaryfunc )PyZlib_objcompress , 1 , comp_compress__doc__ },
679- {"flush" , (binaryfunc )PyZlib_flush , 1 , comp_flush__doc__ },
678+ {"compress" , (binaryfunc )PyZlib_objcompress ,
679+ METH_VARARGS , comp_compress__doc__ },
680+ {"flush" , (binaryfunc )PyZlib_flush ,
681+ METH_VARARGS , comp_flush__doc__ },
680682 {NULL , NULL }
681683};
682684
683685static PyMethodDef Decomp_methods [] =
684686{
685- {"decompress" , (binaryfunc )PyZlib_objdecompress , 1 , decomp_decompress__doc__ },
686- {"flush" , (binaryfunc )PyZlib_unflush , 0 , decomp_flush__doc__ },
687+ {"decompress" , (binaryfunc )PyZlib_objdecompress ,
688+ METH_VARARGS , decomp_decompress__doc__ },
689+ {"flush" , (binaryfunc )PyZlib_unflush ,
690+ METH_VARARGS , decomp_flush__doc__ },
687691 {NULL , NULL }
688692};
689693
@@ -750,13 +754,19 @@ PyZlib_crc32(PyObject *self, PyObject *args)
750754
751755static PyMethodDef zlib_methods [] =
752756{
753- {"adler32" , (PyCFunction )PyZlib_adler32 , 1 , adler32__doc__ },
754- {"compress" , (PyCFunction )PyZlib_compress , 1 , compress__doc__ },
755- {"compressobj" , (PyCFunction )PyZlib_compressobj , 1 , compressobj__doc__ },
756- {"crc32" , (PyCFunction )PyZlib_crc32 , 1 , crc32__doc__ },
757- {"decompress" , (PyCFunction )PyZlib_decompress , 1 , decompress__doc__ },
758- {"decompressobj" , (PyCFunction )PyZlib_decompressobj , 1 , decompressobj__doc__ },
759- {NULL , NULL }
757+ {"adler32" , (PyCFunction )PyZlib_adler32 ,
758+ METH_VARARGS , adler32__doc__ },
759+ {"compress" , (PyCFunction )PyZlib_compress ,
760+ METH_VARARGS , compress__doc__ },
761+ {"compressobj" , (PyCFunction )PyZlib_compressobj ,
762+ METH_VARARGS , compressobj__doc__ },
763+ {"crc32" , (PyCFunction )PyZlib_crc32 ,
764+ METH_VARARGS , crc32__doc__ },
765+ {"decompress" , (PyCFunction )PyZlib_decompress ,
766+ METH_VARARGS , decompress__doc__ },
767+ {"decompressobj" , (PyCFunction )PyZlib_decompressobj ,
768+ METH_VARARGS , decompressobj__doc__ },
769+ {NULL , NULL }
760770};
761771
762772statichere PyTypeObject Comptype = {
0 commit comments