summaryrefslogtreecommitdiff
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-11-27 13:27:31 +0200
committerGitHub <noreply@github.com>2018-11-27 13:27:31 +0200
commit62be74290aca26d16f3f55ece7ff6dad14e60e8d (patch)
tree656625bee7ca61fd87c6370407162522d8fb277f /Modules/_testcapimodule.c
parent81524022d0c0df7a41f9b2b2df41e2ebe140e610 (diff)
downloadcpython-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 'Modules/_testcapimodule.c')
-rw-r--r--Modules/_testcapimodule.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 4715f39e6d..4933ef3b61 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4787,14 +4787,14 @@ static PyMethodDef TestMethods[] = {
{"getbuffer_with_null_view", getbuffer_with_null_view, METH_O},
{"test_buildvalue_N", test_buildvalue_N, METH_NOARGS},
{"get_args", get_args, METH_VARARGS},
- {"get_kwargs", (PyCFunction)get_kwargs, METH_VARARGS|METH_KEYWORDS},
+ {"get_kwargs", (PyCFunction)(void(*)(void))get_kwargs, METH_VARARGS|METH_KEYWORDS},
{"getargs_tuple", getargs_tuple, METH_VARARGS},
- {"getargs_keywords", (PyCFunction)getargs_keywords,
+ {"getargs_keywords", (PyCFunction)(void(*)(void))getargs_keywords,
METH_VARARGS|METH_KEYWORDS},
- {"getargs_keyword_only", (PyCFunction)getargs_keyword_only,
+ {"getargs_keyword_only", (PyCFunction)(void(*)(void))getargs_keyword_only,
METH_VARARGS|METH_KEYWORDS},
{"getargs_positional_only_and_keywords",
- (PyCFunction)getargs_positional_only_and_keywords,
+ (PyCFunction)(void(*)(void))getargs_positional_only_and_keywords,
METH_VARARGS|METH_KEYWORDS},
{"getargs_b", getargs_b, METH_VARARGS},
{"getargs_B", getargs_B, METH_VARARGS},
@@ -4863,7 +4863,7 @@ static PyMethodDef TestMethods[] = {
{"set_exc_info", test_set_exc_info, METH_VARARGS},
{"argparsing", argparsing, METH_VARARGS},
{"code_newempty", code_newempty, METH_VARARGS},
- {"make_exception_with_doc", (PyCFunction)make_exception_with_doc,
+ {"make_exception_with_doc", (PyCFunction)(void(*)(void))make_exception_with_doc,
METH_VARARGS | METH_KEYWORDS},
{"make_memoryview_from_NULL_pointer", make_memoryview_from_NULL_pointer,
METH_NOARGS},
@@ -4960,7 +4960,7 @@ static PyMethodDef TestMethods[] = {
{"get_mapping_items", get_mapping_items, METH_O},
{"test_pythread_tss_key_state", test_pythread_tss_key_state, METH_VARARGS},
{"hamt", new_hamt, METH_NOARGS},
- {"bad_get", (PyCFunction)bad_get, METH_FASTCALL},
+ {"bad_get", (PyCFunction)(void(*)(void))bad_get, METH_FASTCALL},
{"EncodeLocaleEx", encode_locale_ex, METH_VARARGS},
{"DecodeLocaleEx", decode_locale_ex, METH_VARARGS},
{"get_global_config", get_global_config, METH_NOARGS},
@@ -5388,7 +5388,7 @@ generic_alias_mro_entries(PyGenericAliasObject *self, PyObject *bases)
}
static PyMethodDef generic_alias_methods[] = {
- {"__mro_entries__", (PyCFunction) generic_alias_mro_entries, METH_O, NULL},
+ {"__mro_entries__", (PyCFunction)(void(*)(void))generic_alias_mro_entries, METH_O, NULL},
{NULL} /* sentinel */
};