summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2000-08-03 02:04:05 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2000-08-03 02:04:05 (GMT)
commit14f515844d3eae2818af3f1da7b32c38d8e73078 (patch)
tree3fc73de6287da85ef867e68fb4a5c202f4abfa99
parent6c7a46a2f012a5082bcac325e4cae58a9aadb032 (diff)
downloadcpython-14f515844d3eae2818af3f1da7b32c38d8e73078.zip
cpython-14f515844d3eae2818af3f1da7b32c38d8e73078.tar.gz
cpython-14f515844d3eae2818af3f1da7b32c38d8e73078.tar.bz2
Use METH_VARARGS instead of numeric constant 1
-rw-r--r--Modules/zlibmodule.c34
1 files changed, 22 insertions, 12 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c
index ff34706..9416528 100644
--- a/Modules/zlibmodule.c
+++ b/Modules/zlibmodule.c
@@ -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 = {