mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Use METH_OLDARGS instead of numeric constant 0 in method def. tables
This commit is contained in:
parent
767bf49b6b
commit
a1abb728bc
9 changed files with 78 additions and 55 deletions
|
|
@ -1160,7 +1160,8 @@ strop_methods[] = {
|
|||
METH_VARARGS, atoi__doc__},
|
||||
{"atol", strop_atol,
|
||||
METH_VARARGS, atol__doc__},
|
||||
{"capitalize", strop_capitalize, 0, capitalize__doc__},
|
||||
{"capitalize", strop_capitalize,
|
||||
METH_OLDARGS, capitalize__doc__},
|
||||
{"count", strop_count,
|
||||
METH_VARARGS, count__doc__},
|
||||
{"expandtabs", strop_expandtabs,
|
||||
|
|
@ -1171,24 +1172,30 @@ strop_methods[] = {
|
|||
METH_VARARGS, joinfields__doc__},
|
||||
{"joinfields", strop_joinfields,
|
||||
METH_VARARGS, joinfields__doc__},
|
||||
{"lstrip", strop_lstrip, 0, lstrip__doc__},
|
||||
{"lower", strop_lower, 0, lower__doc__},
|
||||
{"lstrip", strop_lstrip,
|
||||
METH_OLDARGS, lstrip__doc__},
|
||||
{"lower", strop_lower,
|
||||
METH_OLDARGS, lower__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__},
|
||||
{"rstrip", strop_rstrip,
|
||||
METH_OLDARGS, rstrip__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__},
|
||||
{"strip", strop_strip,
|
||||
METH_OLDARGS, strip__doc__},
|
||||
{"swapcase", strop_swapcase,
|
||||
METH_OLDARGS, swapcase__doc__},
|
||||
{"translate", strop_translate,
|
||||
METH_VARARGS, translate__doc__},
|
||||
{"upper", strop_upper, 0, upper__doc__},
|
||||
{"upper", strop_upper,
|
||||
METH_OLDARGS, upper__doc__},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue