+ simplify porting of template module to Python3

This commit is contained in:
wmayer 2016-01-17 19:17:00 +01:00
parent 7773ad03c1
commit 5aea3220c8
2 changed files with 2 additions and 8 deletions

View File

@ -49,8 +49,7 @@ private:
/* Python entry */
extern "C" {
void _TEMPLATE_AppExport init_TEMPLATE_() {
PyMODINIT_FUNC init_TEMPLATE_() {
// ADD YOUR CODE HERE
//
@ -58,5 +57,3 @@ void _TEMPLATE_AppExport init_TEMPLATE_() {
new _TEMPLATE_::Module();
Base::Console().Log("Loading _TEMPLATE_ module... done\n");
}
} // extern "C"

View File

@ -55,8 +55,7 @@ private:
/* Python entry */
extern "C" {
void _TEMPLATE_GuiExport init_TEMPLATE_Gui()
PyMODINIT_FUNC init_TEMPLATE_Gui()
{
if (!Gui::Application::Instance) {
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
@ -73,5 +72,3 @@ void _TEMPLATE_GuiExport init_TEMPLATE_Gui()
new _TEMPLATE_Gui::Module();
Base::Console().Log("Loading GUI of _TEMPLATE_ module... done\n");
}
} // extern "C"