py3: fox compiler warnings
issue 0000995
This commit is contained in:
@@ -221,7 +221,12 @@ Application::Application(std::map<std::string,std::string> &mConfig)
|
||||
// setting up Python binding
|
||||
Base::PyGILStateLocker lock;
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef FreeCADModuleDef = {PyModuleDef_HEAD_INIT,"FreeCAD", FreeCAD_doc, -1, Application::Methods};
|
||||
static struct PyModuleDef FreeCADModuleDef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"FreeCAD", FreeCAD_doc, -1,
|
||||
Application::Methods,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
PyObject* pAppModule = PyModule_Create(&FreeCADModuleDef);
|
||||
_PyImport_FixupBuiltin(pAppModule, "FreeCAD");
|
||||
#else
|
||||
@@ -230,7 +235,12 @@ Application::Application(std::map<std::string,std::string> &mConfig)
|
||||
Py::Module(pAppModule).setAttr(std::string("ActiveDocument"),Py::None());
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef ConsoleModuleDef = {PyModuleDef_HEAD_INIT, "__FreeCADConsole__", Console_doc, -1, ConsoleSingleton::Methods};
|
||||
static struct PyModuleDef ConsoleModuleDef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"__FreeCADConsole__", Console_doc, -1,
|
||||
ConsoleSingleton::Methods,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
PyObject* pConsoleModule = PyModule_Create(&ConsoleModuleDef);
|
||||
#else
|
||||
PyObject* pConsoleModule = Py_InitModule3("__FreeCADConsole__", ConsoleSingleton::Methods, Console_doc);
|
||||
@@ -253,7 +263,11 @@ Application::Application(std::map<std::string,std::string> &mConfig)
|
||||
// remove these types from the FreeCAD module.
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef BaseModuleDef = {PyModuleDef_HEAD_INIT, "__FreeCADBase__", Base_doc, -1, NULL};
|
||||
static struct PyModuleDef BaseModuleDef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"__FreeCADBase__", Base_doc, -1,
|
||||
NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
PyObject* pBaseModule = PyModule_Create(&BaseModuleDef);
|
||||
#else
|
||||
PyObject* pBaseModule = Py_InitModule3("__FreeCADBase__", NULL, Base_doc);
|
||||
@@ -280,7 +294,12 @@ Application::Application(std::map<std::string,std::string> &mConfig)
|
||||
|
||||
//insert Units module
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
static struct PyModuleDef UnitsModuleDef = {PyModuleDef_HEAD_INIT, "Units", "The Unit API", -1, Base::UnitsApi::Methods};
|
||||
static struct PyModuleDef UnitsModuleDef = {
|
||||
PyModuleDef_HEAD_INIT,
|
||||
"Units", "The Unit API", -1,
|
||||
Base::UnitsApi::Methods,
|
||||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
PyObject* pUnitsModule = PyModule_Create(&UnitsModuleDef);
|
||||
#else
|
||||
PyObject* pUnitsModule = Py_InitModule3("Units", Base::UnitsApi::Methods,"The Unit API");
|
||||
|
||||
Reference in New Issue
Block a user