Silence GCC8's -Wcast-function-type. (#1396)

* Silence GCC8's -Wcast-function-type.

See https://bugs.python.org/issue33012 and PRs linked therein.
This commit is contained in:
Antony Lee 2018-06-24 15:38:09 +02:00 committed by Wenzel Jakob
parent 13043957ce
commit 0ad58d887f

View File

@ -314,7 +314,7 @@ protected:
rec->def = new PyMethodDef(); rec->def = new PyMethodDef();
std::memset(rec->def, 0, sizeof(PyMethodDef)); std::memset(rec->def, 0, sizeof(PyMethodDef));
rec->def->ml_name = rec->name; rec->def->ml_name = rec->name;
rec->def->ml_meth = reinterpret_cast<PyCFunction>(*dispatcher); rec->def->ml_meth = reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>(*dispatcher));
rec->def->ml_flags = METH_VARARGS | METH_KEYWORDS; rec->def->ml_flags = METH_VARARGS | METH_KEYWORDS;
capsule rec_capsule(rec, [](void *ptr) { capsule rec_capsule(rec, [](void *ptr) {