fix -Wcast-function-type

This commit is contained in:
wmayer
2018-08-19 13:11:08 +02:00
parent 557fee3dc6
commit 68f6c82eb1
9 changed files with 42 additions and 6 deletions

View File

@@ -351,10 +351,11 @@ PyTypeObject @self.export.Name@::Type = {
PyMethodDef @self.export.Name@::Methods[] = {
+ for i in self.export.Methode:
{"@i.Name@",
(PyCFunction) staticCallback_@i.Name@,
+ if i.Keyword:
reinterpret_cast<PyCFunction>(reinterpret_cast<void (*) (void)>( staticCallback_@i.Name@ )),
METH_VARARGS|METH_KEYWORDS,
= else:
reinterpret_cast<PyCFunction>( staticCallback_@i.Name@ ),
METH_VARARGS,
-
"@i.Documentation.UserDocu.replace('\\n','\\\\n')@"