+ simplify porting of template module to Python3
This commit is contained in:
parent
7773ad03c1
commit
5aea3220c8
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user