diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 13:27:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 13:27:31 +0200 |
commit | 62be74290aca26d16f3f55ece7ff6dad14e60e8d (patch) | |
tree | 656625bee7ca61fd87c6370407162522d8fb277f /Python/sysmodule.c | |
parent | 81524022d0c0df7a41f9b2b2df41e2ebe140e610 (diff) | |
download | cpython-git-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.gz |
bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)
Fix invalid function cast warnings with gcc 8
for method conventions different from METH_NOARGS, METH_O and
METH_VARARGS excluding Argument Clinic generated code.
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 2284e88d4c..0ca3de39f8 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1521,7 +1521,7 @@ sys_getandroidapilevel(PyObject *self) static PyMethodDef sys_methods[] = { /* Might as well keep this in alphabetic order */ - {"breakpointhook", (PyCFunction)sys_breakpointhook, + {"breakpointhook", (PyCFunction)(void(*)(void))sys_breakpointhook, METH_FASTCALL | METH_KEYWORDS, breakpointhook_doc}, {"callstats", sys_callstats, METH_NOARGS, callstats_doc}, @@ -1560,7 +1560,7 @@ static PyMethodDef sys_methods[] = { {"getrefcount", (PyCFunction)sys_getrefcount, METH_O, getrefcount_doc}, {"getrecursionlimit", sys_getrecursionlimit, METH_NOARGS, getrecursionlimit_doc}, - {"getsizeof", (PyCFunction)sys_getsizeof, + {"getsizeof", (PyCFunction)(void(*)(void))sys_getsizeof, METH_VARARGS | METH_KEYWORDS, getsizeof_doc}, {"_getframe", sys_getframe, METH_VARARGS, getframe_doc}, #ifdef MS_WINDOWS @@ -1601,7 +1601,7 @@ static PyMethodDef sys_methods[] = { set_coroutine_wrapper_doc}, {"get_coroutine_wrapper", sys_get_coroutine_wrapper, METH_NOARGS, get_coroutine_wrapper_doc}, - {"set_asyncgen_hooks", (PyCFunction)sys_set_asyncgen_hooks, + {"set_asyncgen_hooks", (PyCFunction)(void(*)(void))sys_set_asyncgen_hooks, METH_VARARGS | METH_KEYWORDS, set_asyncgen_hooks_doc}, {"get_asyncgen_hooks", sys_get_asyncgen_hooks, METH_NOARGS, get_asyncgen_hooks_doc}, |