mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -2049,8 +2049,8 @@ s_sizeof(PyStructObject *self, void *unused)
|
|||
|
||||
static struct PyMethodDef s_methods[] = {
|
||||
STRUCT_ITER_UNPACK_METHODDEF
|
||||
{"pack", (PyCFunction)(void(*)(void))s_pack, METH_FASTCALL, s_pack__doc__},
|
||||
{"pack_into", (PyCFunction)(void(*)(void))s_pack_into, METH_FASTCALL, s_pack_into__doc__},
|
||||
{"pack", _PyCFunction_CAST(s_pack), METH_FASTCALL, s_pack__doc__},
|
||||
{"pack_into", _PyCFunction_CAST(s_pack_into), METH_FASTCALL, s_pack_into__doc__},
|
||||
STRUCT_UNPACK_METHODDEF
|
||||
STRUCT_UNPACK_FROM_METHODDEF
|
||||
{"__sizeof__", (PyCFunction)s_sizeof, METH_NOARGS, s_sizeof__doc__},
|
||||
|
@ -2298,8 +2298,8 @@ static struct PyMethodDef module_functions[] = {
|
|||
_CLEARCACHE_METHODDEF
|
||||
CALCSIZE_METHODDEF
|
||||
ITER_UNPACK_METHODDEF
|
||||
{"pack", (PyCFunction)(void(*)(void))pack, METH_FASTCALL, pack_doc},
|
||||
{"pack_into", (PyCFunction)(void(*)(void))pack_into, METH_FASTCALL, pack_into_doc},
|
||||
{"pack", _PyCFunction_CAST(pack), METH_FASTCALL, pack_doc},
|
||||
{"pack_into", _PyCFunction_CAST(pack_into), METH_FASTCALL, pack_into_doc},
|
||||
UNPACK_METHODDEF
|
||||
UNPACK_FROM_METHODDEF
|
||||
{NULL, NULL} /* sentinel */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue