mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
Use METH_VARARGS instead of numeric constant 1 in method def. tables
This commit is contained in:
parent
14f515844d
commit
e365fb8d1f
12 changed files with 178 additions and 107 deletions
|
|
@ -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 */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue