mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +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
|
@ -4947,11 +4947,11 @@ static PyMethodDef sock_methods[] = {
|
|||
listen_doc},
|
||||
{"recv", (PyCFunction)sock_recv, METH_VARARGS,
|
||||
recv_doc},
|
||||
{"recv_into", (PyCFunction)(void(*)(void))sock_recv_into, METH_VARARGS | METH_KEYWORDS,
|
||||
{"recv_into", _PyCFunction_CAST(sock_recv_into), METH_VARARGS | METH_KEYWORDS,
|
||||
recv_into_doc},
|
||||
{"recvfrom", (PyCFunction)sock_recvfrom, METH_VARARGS,
|
||||
recvfrom_doc},
|
||||
{"recvfrom_into", (PyCFunction)(void(*)(void))sock_recvfrom_into, METH_VARARGS | METH_KEYWORDS,
|
||||
{"recvfrom_into", _PyCFunction_CAST(sock_recvfrom_into), METH_VARARGS | METH_KEYWORDS,
|
||||
recvfrom_into_doc},
|
||||
{"send", (PyCFunction)sock_send, METH_VARARGS,
|
||||
send_doc},
|
||||
|
@ -4982,7 +4982,7 @@ static PyMethodDef sock_methods[] = {
|
|||
sendmsg_doc},
|
||||
#endif
|
||||
#ifdef HAVE_SOCKADDR_ALG
|
||||
{"sendmsg_afalg", (PyCFunction)(void(*)(void))sock_sendmsg_afalg, METH_VARARGS | METH_KEYWORDS,
|
||||
{"sendmsg_afalg", _PyCFunction_CAST(sock_sendmsg_afalg), METH_VARARGS | METH_KEYWORDS,
|
||||
sendmsg_afalg_doc},
|
||||
#endif
|
||||
{NULL, NULL} /* sentinel */
|
||||
|
@ -6970,7 +6970,7 @@ static PyMethodDef socket_methods[] = {
|
|||
{"inet_ntop", socket_inet_ntop,
|
||||
METH_VARARGS, inet_ntop_doc},
|
||||
#endif
|
||||
{"getaddrinfo", (PyCFunction)(void(*)(void))socket_getaddrinfo,
|
||||
{"getaddrinfo", _PyCFunction_CAST(socket_getaddrinfo),
|
||||
METH_VARARGS | METH_KEYWORDS, getaddrinfo_doc},
|
||||
{"getnameinfo", socket_getnameinfo,
|
||||
METH_VARARGS, getnameinfo_doc},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue