mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
gh-111178: remove redundant casts for functions with correct signatures (#131673)
This commit is contained in:
parent
8cd29c2b53
commit
edbf7fb129
30 changed files with 96 additions and 101 deletions
|
@ -14316,7 +14316,7 @@ static PyMethodDef unicode_methods[] = {
|
|||
UNICODE_ISPRINTABLE_METHODDEF
|
||||
UNICODE_ZFILL_METHODDEF
|
||||
{"format", _PyCFunction_CAST(do_string_format), METH_VARARGS | METH_KEYWORDS, format__doc__},
|
||||
{"format_map", (PyCFunction) do_string_format_map, METH_O, format_map__doc__},
|
||||
{"format_map", do_string_format_map, METH_O, format_map__doc__},
|
||||
UNICODE___FORMAT___METHODDEF
|
||||
UNICODE_MAKETRANS_METHODDEF
|
||||
UNICODE_SIZEOF_METHODDEF
|
||||
|
@ -14340,14 +14340,14 @@ static PyNumberMethods unicode_as_number = {
|
|||
};
|
||||
|
||||
static PySequenceMethods unicode_as_sequence = {
|
||||
(lenfunc) unicode_length, /* sq_length */
|
||||
PyUnicode_Concat, /* sq_concat */
|
||||
(ssizeargfunc) unicode_repeat, /* sq_repeat */
|
||||
(ssizeargfunc) unicode_getitem, /* sq_item */
|
||||
unicode_length, /* sq_length */
|
||||
PyUnicode_Concat, /* sq_concat */
|
||||
unicode_repeat, /* sq_repeat */
|
||||
unicode_getitem, /* sq_item */
|
||||
0, /* sq_slice */
|
||||
0, /* sq_ass_item */
|
||||
0, /* sq_ass_slice */
|
||||
PyUnicode_Contains, /* sq_contains */
|
||||
PyUnicode_Contains, /* sq_contains */
|
||||
};
|
||||
|
||||
static PyObject*
|
||||
|
@ -14421,9 +14421,9 @@ unicode_subscript(PyObject* self, PyObject* item)
|
|||
}
|
||||
|
||||
static PyMappingMethods unicode_as_mapping = {
|
||||
(lenfunc)unicode_length, /* mp_length */
|
||||
(binaryfunc)unicode_subscript, /* mp_subscript */
|
||||
(objobjargproc)0, /* mp_ass_subscript */
|
||||
unicode_length, /* mp_length */
|
||||
unicode_subscript, /* mp_subscript */
|
||||
0, /* mp_ass_subscript */
|
||||
};
|
||||
|
||||
|
||||
|
@ -15566,7 +15566,7 @@ PyTypeObject PyUnicode_Type = {
|
|||
sizeof(PyUnicodeObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
/* Slots */
|
||||
(destructor)unicode_dealloc, /* tp_dealloc */
|
||||
unicode_dealloc, /* tp_dealloc */
|
||||
0, /* tp_vectorcall_offset */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
|
@ -15575,9 +15575,9 @@ PyTypeObject PyUnicode_Type = {
|
|||
&unicode_as_number, /* tp_as_number */
|
||||
&unicode_as_sequence, /* tp_as_sequence */
|
||||
&unicode_as_mapping, /* tp_as_mapping */
|
||||
(hashfunc) unicode_hash, /* tp_hash*/
|
||||
unicode_hash, /* tp_hash*/
|
||||
0, /* tp_call*/
|
||||
(reprfunc) unicode_str, /* tp_str */
|
||||
unicode_str, /* tp_str */
|
||||
PyObject_GenericGetAttr, /* tp_getattro */
|
||||
0, /* tp_setattro */
|
||||
0, /* tp_as_buffer */
|
||||
|
@ -16474,9 +16474,9 @@ _PyUnicode_Fini(PyInterpreterState *interp)
|
|||
to the string.Formatter class implemented in Python. */
|
||||
|
||||
static PyMethodDef _string_methods[] = {
|
||||
{"formatter_field_name_split", (PyCFunction) formatter_field_name_split,
|
||||
{"formatter_field_name_split", formatter_field_name_split,
|
||||
METH_O, PyDoc_STR("split the argument as a field name")},
|
||||
{"formatter_parser", (PyCFunction) formatter_parser,
|
||||
{"formatter_parser", formatter_parser,
|
||||
METH_O, PyDoc_STR("parse the argument as a format string")},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue