diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2000-08-03 02:06:16 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2000-08-03 02:06:16 (GMT) |
commit | e365fb8d1ff062d619f9476265e48e9ba8ab2bf6 (patch) | |
tree | cb80331534a82abbadb7d45e9f654c3e97b1b3f5 /Modules/stropmodule.c | |
parent | 14f515844d3eae2818af3f1da7b32c38d8e73078 (diff) | |
download | cpython-e365fb8d1ff062d619f9476265e48e9ba8ab2bf6.zip cpython-e365fb8d1ff062d619f9476265e48e9ba8ab2bf6.tar.gz cpython-e365fb8d1ff062d619f9476265e48e9ba8ab2bf6.tar.bz2 |
Use METH_VARARGS instead of numeric constant 1 in method def. tables
Diffstat (limited to 'Modules/stropmodule.c')
-rw-r--r-- | Modules/stropmodule.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c index 0ec9e3d..0353ca5 100644 --- a/Modules/stropmodule.c +++ b/Modules/stropmodule.c @@ -1154,26 +1154,40 @@ strop_replace(PyObject *self, PyObject *args) static PyMethodDef strop_methods[] = { - {"atof", strop_atof, 1, atof__doc__}, - {"atoi", strop_atoi, 1, atoi__doc__}, - {"atol", strop_atol, 1, atol__doc__}, + {"atof", strop_atof, + METH_VARARGS, atof__doc__}, + {"atoi", strop_atoi, + METH_VARARGS, atoi__doc__}, + {"atol", strop_atol, + METH_VARARGS, atol__doc__}, {"capitalize", strop_capitalize, 0, capitalize__doc__}, - {"count", strop_count, 1, count__doc__}, - {"expandtabs", strop_expandtabs, 1, expandtabs__doc__}, - {"find", strop_find, 1, find__doc__}, - {"join", strop_joinfields, 1, joinfields__doc__}, - {"joinfields", strop_joinfields, 1, joinfields__doc__}, + {"count", strop_count, + METH_VARARGS, count__doc__}, + {"expandtabs", strop_expandtabs, + METH_VARARGS, expandtabs__doc__}, + {"find", strop_find, + METH_VARARGS, find__doc__}, + {"join", strop_joinfields, + METH_VARARGS, joinfields__doc__}, + {"joinfields", strop_joinfields, + METH_VARARGS, joinfields__doc__}, {"lstrip", strop_lstrip, 0, lstrip__doc__}, {"lower", strop_lower, 0, lower__doc__}, - {"maketrans", strop_maketrans, 1, maketrans__doc__}, - {"replace", strop_replace, 1, replace__doc__}, - {"rfind", strop_rfind, 1, rfind__doc__}, + {"maketrans", strop_maketrans, + METH_VARARGS, maketrans__doc__}, + {"replace", strop_replace, + METH_VARARGS, replace__doc__}, + {"rfind", strop_rfind, + METH_VARARGS, rfind__doc__}, {"rstrip", strop_rstrip, 0, rstrip__doc__}, - {"split", strop_splitfields, 1, splitfields__doc__}, - {"splitfields", strop_splitfields, 1, splitfields__doc__}, + {"split", strop_splitfields, + METH_VARARGS, splitfields__doc__}, + {"splitfields", strop_splitfields, + METH_VARARGS, splitfields__doc__}, {"strip", strop_strip, 0, strip__doc__}, {"swapcase", strop_swapcase, 0, swapcase__doc__}, - {"translate", strop_translate, 1, translate__doc__}, + {"translate", strop_translate, + METH_VARARGS, translate__doc__}, {"upper", strop_upper, 0, upper__doc__}, {NULL, NULL} /* sentinel */ }; |