diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-11-27 11:27:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 11:27:31 (GMT) |
commit | 62be74290aca26d16f3f55ece7ff6dad14e60e8d (patch) | |
tree | 656625bee7ca61fd87c6370407162522d8fb277f /Modules/_struct.c | |
parent | 81524022d0c0df7a41f9b2b2df41e2ebe140e610 (diff) | |
download | cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.zip cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.gz cpython-62be74290aca26d16f3f55ece7ff6dad14e60e8d.tar.bz2 |
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/_struct.c')
-rw-r--r-- | Modules/_struct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index 0be52d9..6767330 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -2006,8 +2006,8 @@ s_sizeof(PyStructObject *self, void *unused) static struct PyMethodDef s_methods[] = { STRUCT_ITER_UNPACK_METHODDEF - {"pack", (PyCFunction)s_pack, METH_FASTCALL, s_pack__doc__}, - {"pack_into", (PyCFunction)s_pack_into, METH_FASTCALL, s_pack_into__doc__}, + {"pack", (PyCFunction)(void(*)(void))s_pack, METH_FASTCALL, s_pack__doc__}, + {"pack_into", (PyCFunction)(void(*)(void))s_pack_into, METH_FASTCALL, s_pack_into__doc__}, STRUCT_UNPACK_METHODDEF STRUCT_UNPACK_FROM_METHODDEF {"__sizeof__", (PyCFunction)s_sizeof, METH_NOARGS, s_sizeof__doc__}, @@ -2264,8 +2264,8 @@ static struct PyMethodDef module_functions[] = { _CLEARCACHE_METHODDEF CALCSIZE_METHODDEF ITER_UNPACK_METHODDEF - {"pack", (PyCFunction)pack, METH_FASTCALL, pack_doc}, - {"pack_into", (PyCFunction)pack_into, METH_FASTCALL, pack_into_doc}, + {"pack", (PyCFunction)(void(*)(void))pack, METH_FASTCALL, pack_doc}, + {"pack_into", (PyCFunction)(void(*)(void))pack_into, METH_FASTCALL, pack_into_doc}, UNPACK_METHODDEF UNPACK_FROM_METHODDEF {NULL, NULL} /* sentinel */ |