mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
gh-91320: Use _PyCFunction_CAST() (#92251)
Replace "(PyCFunction)(void(*)(void))func" cast with _PyCFunction_CAST(func). Change generated by the command: sed -i -e \ 's!(PyCFunction)(void(\*)(void)) *\([A-Za-z0-9_]\+\)!_PyCFunction_CAST(\1)!g' \ $(find -name "*.c")
This commit is contained in:
parent
551d02b3e6
commit
804f2529d8
31 changed files with 146 additions and 146 deletions
|
|
@ -3655,9 +3655,9 @@ PyDoc_STRVAR(values__doc__,
|
|||
|
||||
static PyMethodDef mapp_methods[] = {
|
||||
DICT___CONTAINS___METHODDEF
|
||||
{"__getitem__", (PyCFunction)(void(*)(void))dict_subscript, METH_O | METH_COEXIST,
|
||||
{"__getitem__", _PyCFunction_CAST(dict_subscript), METH_O | METH_COEXIST,
|
||||
getitem__doc__},
|
||||
{"__sizeof__", (PyCFunction)(void(*)(void))dict_sizeof, METH_NOARGS,
|
||||
{"__sizeof__", _PyCFunction_CAST(dict_sizeof), METH_NOARGS,
|
||||
sizeof__doc__},
|
||||
DICT_GET_METHODDEF
|
||||
DICT_SETDEFAULT_METHODDEF
|
||||
|
|
@ -3669,7 +3669,7 @@ static PyMethodDef mapp_methods[] = {
|
|||
items__doc__},
|
||||
{"values", dictvalues_new, METH_NOARGS,
|
||||
values__doc__},
|
||||
{"update", (PyCFunction)(void(*)(void))dict_update, METH_VARARGS | METH_KEYWORDS,
|
||||
{"update", _PyCFunction_CAST(dict_update), METH_VARARGS | METH_KEYWORDS,
|
||||
update__doc__},
|
||||
DICT_FROMKEYS_METHODDEF
|
||||
{"clear", (PyCFunction)dict_clear, METH_NOARGS,
|
||||
|
|
@ -4026,9 +4026,9 @@ dictiter_reduce(dictiterobject *di, PyObject *Py_UNUSED(ignored));
|
|||
PyDoc_STRVAR(reduce_doc, "Return state information for pickling.");
|
||||
|
||||
static PyMethodDef dictiter_methods[] = {
|
||||
{"__length_hint__", (PyCFunction)(void(*)(void))dictiter_len, METH_NOARGS,
|
||||
{"__length_hint__", _PyCFunction_CAST(dictiter_len), METH_NOARGS,
|
||||
length_hint_doc},
|
||||
{"__reduce__", (PyCFunction)(void(*)(void))dictiter_reduce, METH_NOARGS,
|
||||
{"__reduce__", _PyCFunction_CAST(dictiter_reduce), METH_NOARGS,
|
||||
reduce_doc},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
|
@ -5079,7 +5079,7 @@ PyDoc_STRVAR(reversed_keys_doc,
|
|||
static PyMethodDef dictkeys_methods[] = {
|
||||
{"isdisjoint", (PyCFunction)dictviews_isdisjoint, METH_O,
|
||||
isdisjoint_doc},
|
||||
{"__reversed__", (PyCFunction)(void(*)(void))dictkeys_reversed, METH_NOARGS,
|
||||
{"__reversed__", _PyCFunction_CAST(dictkeys_reversed), METH_NOARGS,
|
||||
reversed_keys_doc},
|
||||
{NULL, NULL} /* sentinel */
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue