py3: ported Skechter to python3

This commit is contained in:
wmayer
2016-01-23 19:04:03 +01:00
committed by looooo
parent 3808a2e999
commit 03c232fa82
9 changed files with 91 additions and 40 deletions

View File

@@ -43,7 +43,7 @@ extern PyObject* initModule();
}
/* Python entry */
PyMODINIT_FUNC initSketcher()
PyMOD_INIT_FUNC(Sketcher)
{
// load dependent module
try {
@@ -51,7 +51,7 @@ PyMODINIT_FUNC initSketcher()
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
PyObject* sketcherModule = Sketcher::initModule();
@@ -73,4 +73,6 @@ PyMODINIT_FUNC initSketcher()
Sketcher::PropertyConstraintList::init();
Base::Console().Log("Loading Sketcher module... done\n");
PyMOD_Return(sketcherModule);
}