]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use METH_VARARGS instead of numeric constant 1
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 3 Aug 2000 02:04:05 +0000 (02:04 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 3 Aug 2000 02:04:05 +0000 (02:04 +0000)
Modules/zlibmodule.c

index ff3470686a9e9e9682e5120020ea0e2b6054742e..9416528ad4cdfa9fc7c3291865a7c5e60ebac4c1 100644 (file)
@@ -610,7 +610,7 @@ PyZlib_unflush(compobject *self, PyObject *args)
   int length=0, err;
   PyObject *RetVal;
   
-  if (!PyArg_NoArgs(args))
+  if (!PyArg_ParseTuple(args, ""))
       return NULL;
   if (!(RetVal = PyString_FromStringAndSize(NULL, DEFAULTALLOC)))
   {
@@ -675,15 +675,19 @@ PyZlib_unflush(compobject *self, PyObject *args)
 
 static PyMethodDef comp_methods[] =
 {
-        {"compress", (binaryfunc)PyZlib_objcompress, 1, comp_compress__doc__},
-        {"flush", (binaryfunc)PyZlib_flush, 1, comp_flush__doc__},
+        {"compress", (binaryfunc)PyZlib_objcompress, 
+        METH_VARARGS, comp_compress__doc__},
+        {"flush", (binaryfunc)PyZlib_flush, 
+        METH_VARARGS, comp_flush__doc__},
         {NULL, NULL}
 };
 
 static PyMethodDef Decomp_methods[] =
 {
-        {"decompress", (binaryfunc)PyZlib_objdecompress, 1, decomp_decompress__doc__},
-        {"flush", (binaryfunc)PyZlib_unflush, 0, decomp_flush__doc__},
+        {"decompress", (binaryfunc)PyZlib_objdecompress, 
+        METH_VARARGS, decomp_decompress__doc__},
+        {"flush", (binaryfunc)PyZlib_unflush, 
+        METH_VARARGS, decomp_flush__doc__},
         {NULL, NULL}
 };
 
@@ -750,13 +754,19 @@ PyZlib_crc32(PyObject *self, PyObject *args)
 
 static PyMethodDef zlib_methods[] =
 {
-       {"adler32", (PyCFunction)PyZlib_adler32, 1, adler32__doc__},     
-        {"compress", (PyCFunction)PyZlib_compress, 1, compress__doc__},
-        {"compressobj", (PyCFunction)PyZlib_compressobj, 1, compressobj__doc__},
-       {"crc32", (PyCFunction)PyZlib_crc32, 1, crc32__doc__},   
-        {"decompress", (PyCFunction)PyZlib_decompress, 1, decompress__doc__},
-        {"decompressobj", (PyCFunction)PyZlib_decompressobj, 1, decompressobj__doc__},
-        {NULL, NULL}
+       {"adler32", (PyCFunction)PyZlib_adler32, 
+        METH_VARARGS, adler32__doc__},  
+       {"compress", (PyCFunction)PyZlib_compress, 
+        METH_VARARGS, compress__doc__},
+       {"compressobj", (PyCFunction)PyZlib_compressobj, 
+        METH_VARARGS, compressobj__doc__},
+       {"crc32", (PyCFunction)PyZlib_crc32, 
+        METH_VARARGS, crc32__doc__},    
+       {"decompress", (PyCFunction)PyZlib_decompress, 
+        METH_VARARGS, decompress__doc__},
+       {"decompressobj", (PyCFunction)PyZlib_decompressobj, 
+        METH_VARARGS, decompressobj__doc__},
+       {NULL, NULL}
 };
 
 statichere PyTypeObject Comptype = {