We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97b20e5 commit baf6b99Copy full SHA for baf6b99
include/pybind11/pybind11.h
@@ -306,7 +306,7 @@ class cpp_function : public function {
306
rec->def = new PyMethodDef();
307
std::memset(rec->def, 0, sizeof(PyMethodDef));
308
rec->def->ml_name = rec->name;
309
- rec->def->ml_meth = reinterpret_cast<PyCFunction>(*dispatcher);
+ rec->def->ml_meth = reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>(*dispatcher));
310
rec->def->ml_flags = METH_VARARGS | METH_KEYWORDS;
311
312
capsule rec_capsule(rec, [](void *ptr) {
0 commit comments