mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +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
|
@ -2559,9 +2559,9 @@ channel__channel_id(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
}
|
||||
|
||||
static PyMethodDef module_functions[] = {
|
||||
{"create", (PyCFunction)(void(*)(void))interp_create,
|
||||
{"create", _PyCFunction_CAST(interp_create),
|
||||
METH_VARARGS | METH_KEYWORDS, create_doc},
|
||||
{"destroy", (PyCFunction)(void(*)(void))interp_destroy,
|
||||
{"destroy", _PyCFunction_CAST(interp_destroy),
|
||||
METH_VARARGS | METH_KEYWORDS, destroy_doc},
|
||||
{"list_all", interp_list_all,
|
||||
METH_NOARGS, list_all_doc},
|
||||
|
@ -2569,31 +2569,31 @@ static PyMethodDef module_functions[] = {
|
|||
METH_NOARGS, get_current_doc},
|
||||
{"get_main", interp_get_main,
|
||||
METH_NOARGS, get_main_doc},
|
||||
{"is_running", (PyCFunction)(void(*)(void))interp_is_running,
|
||||
{"is_running", _PyCFunction_CAST(interp_is_running),
|
||||
METH_VARARGS | METH_KEYWORDS, is_running_doc},
|
||||
{"run_string", (PyCFunction)(void(*)(void))interp_run_string,
|
||||
{"run_string", _PyCFunction_CAST(interp_run_string),
|
||||
METH_VARARGS | METH_KEYWORDS, run_string_doc},
|
||||
|
||||
{"is_shareable", (PyCFunction)(void(*)(void))object_is_shareable,
|
||||
{"is_shareable", _PyCFunction_CAST(object_is_shareable),
|
||||
METH_VARARGS | METH_KEYWORDS, is_shareable_doc},
|
||||
|
||||
{"channel_create", channel_create,
|
||||
METH_NOARGS, channel_create_doc},
|
||||
{"channel_destroy", (PyCFunction)(void(*)(void))channel_destroy,
|
||||
{"channel_destroy", _PyCFunction_CAST(channel_destroy),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_destroy_doc},
|
||||
{"channel_list_all", channel_list_all,
|
||||
METH_NOARGS, channel_list_all_doc},
|
||||
{"channel_list_interpreters", (PyCFunction)(void(*)(void))channel_list_interpreters,
|
||||
{"channel_list_interpreters", _PyCFunction_CAST(channel_list_interpreters),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_list_interpreters_doc},
|
||||
{"channel_send", (PyCFunction)(void(*)(void))channel_send,
|
||||
{"channel_send", _PyCFunction_CAST(channel_send),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_send_doc},
|
||||
{"channel_recv", (PyCFunction)(void(*)(void))channel_recv,
|
||||
{"channel_recv", _PyCFunction_CAST(channel_recv),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_recv_doc},
|
||||
{"channel_close", (PyCFunction)(void(*)(void))channel_close,
|
||||
{"channel_close", _PyCFunction_CAST(channel_close),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_close_doc},
|
||||
{"channel_release", (PyCFunction)(void(*)(void))channel_release,
|
||||
{"channel_release", _PyCFunction_CAST(channel_release),
|
||||
METH_VARARGS | METH_KEYWORDS, channel_release_doc},
|
||||
{"_channel_id", (PyCFunction)(void(*)(void))channel__channel_id,
|
||||
{"_channel_id", _PyCFunction_CAST(channel__channel_id),
|
||||
METH_VARARGS | METH_KEYWORDS, NULL},
|
||||
|
||||
{NULL, NULL} /* sentinel */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue