mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
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:
parent
97b20e537a
commit
baf6b99004
@ -306,7 +306,7 @@ protected:
|
||||
rec->def = new PyMethodDef();
|
||||
std::memset(rec->def, 0, sizeof(PyMethodDef));
|
||||
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;
|
||||
|
||||
capsule rec_capsule(rec, [](void *ptr) {
|
||||
|
Loading…
Reference in New Issue
Block a user