mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
|
|
@ -151,8 +151,8 @@ dump_memo_stats(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(ignored))
|
|||
}
|
||||
|
||||
static PyMethodDef ParseMethods[] = {
|
||||
{"parse_file", (PyCFunction)(void(*)(void))parse_file, METH_VARARGS|METH_KEYWORDS, "Parse a file."},
|
||||
{"parse_string", (PyCFunction)(void(*)(void))parse_string, METH_VARARGS|METH_KEYWORDS, "Parse a string."},
|
||||
{"parse_file", _PyCFunction_CAST(parse_file), METH_VARARGS|METH_KEYWORDS, "Parse a file."},
|
||||
{"parse_string", _PyCFunction_CAST(parse_string), METH_VARARGS|METH_KEYWORDS, "Parse a string."},
|
||||
{"clear_memo_stats", clear_memo_stats, METH_NOARGS},
|
||||
{"dump_memo_stats", dump_memo_stats, METH_NOARGS},
|
||||
{"get_memo_stats", get_memo_stats, METH_NOARGS},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue