+ simplify porting of MeshPart module to Python3
This commit is contained in:
@@ -30,15 +30,16 @@
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
|
||||
extern struct PyMethodDef MeshPart_methods[];
|
||||
namespace MeshPart {
|
||||
extern PyObject* initModule();
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(module_MeshPart_doc,
|
||||
"This module is the MeshPart module.");
|
||||
|
||||
|
||||
/* Python entry */
|
||||
extern "C" {
|
||||
void MeshPartExport initMeshPart()
|
||||
PyMODINIT_FUNC initMeshPart()
|
||||
{
|
||||
// load dependent module
|
||||
try {
|
||||
@@ -49,15 +50,6 @@ void MeshPartExport initMeshPart()
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
}
|
||||
Py_InitModule3("MeshPart", MeshPart_methods, module_MeshPart_doc); /* mod name, table ptr */
|
||||
(void)MeshPart::initModule();
|
||||
Base::Console().Log("Loading MeshPart module... done\n");
|
||||
|
||||
|
||||
// NOTE: To finish the initialization of our own type objects we must
|
||||
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
|
||||
// This function is responsible for adding inherited slots from a type's base class.
|
||||
|
||||
//MeshPart::FeatureViewPart ::init();
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user