Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
py3: FEM, PyMods, preprocessor conditions, Py::Long vs Py::Int
  • Loading branch information
looooo authored and wwmayer committed Feb 19, 2017
1 parent 3fab41f commit 5c0bcf6
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 79 deletions.
6 changes: 4 additions & 2 deletions src/Mod/Fem/App/AppFem.cpp
Expand Up @@ -74,7 +74,7 @@ extern PyObject* initModule();
}

/* Python entry */
PyMODINIT_FUNC initFem()
PyMOD_INIT_FUNC(Fem)
{
// load dependend module
try {
Expand All @@ -83,7 +83,7 @@ PyMODINIT_FUNC initFem()
}
catch(const Base::Exception& e) {
PyErr_SetString(PyExc_ImportError, e.what());
return;
PyMOD_Return(0);
}
PyObject* femModule = Fem::initModule();
Base::Console().Log("Loading Fem module... done\n");
Expand Down Expand Up @@ -183,4 +183,6 @@ PyMODINIT_FUNC initFem()
Fem::FemPostSphereFunction ::init();
Fem::PropertyPostDataObject ::init();
#endif

PyMOD_Return(femModule);
}
28 changes: 14 additions & 14 deletions src/Mod/Fem/App/FemMeshPy.xml
Expand Up @@ -154,7 +154,7 @@
<Documentation>
<UserDocu>Number of nodes in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="NodeCount" Type="Int"/>
<Parameter Name="NodeCount" Type="Long"/>
</Attribute>
<Attribute Name="Edges" ReadOnly="true">
<Documentation>
Expand All @@ -166,7 +166,7 @@
<Documentation>
<UserDocu>Number of edges in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="EdgeCount" Type="Int"/>
<Parameter Name="EdgeCount" Type="Long"/>
</Attribute>
<Attribute Name="Faces" ReadOnly="true">
<Documentation>
Expand All @@ -178,25 +178,25 @@
<Documentation>
<UserDocu>Number of Faces in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="FaceCount" Type="Int"/>
<Parameter Name="FaceCount" Type="Long"/>
</Attribute>
<Attribute Name="TriangleCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Triangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="TriangleCount" Type="Int"/>
<Parameter Name="TriangleCount" Type="Long"/>
</Attribute>
<Attribute Name="QuadrangleCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="QuadrangleCount" Type="Int"/>
<Parameter Name="QuadrangleCount" Type="Long"/>
</Attribute>
<Attribute Name="PolygonCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Quadrangles in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PolygonCount" Type="Int"/>
<Parameter Name="PolygonCount" Type="Long"/>
</Attribute>
<Attribute Name="Volumes" ReadOnly="true">
<Documentation>
Expand All @@ -208,49 +208,49 @@
<Documentation>
<UserDocu>Number of Volumes in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="VolumeCount" Type="Int"/>
<Parameter Name="VolumeCount" Type="Long"/>
</Attribute>
<Attribute Name="TetraCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Tetras in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="TetraCount" Type="Int"/>
<Parameter Name="TetraCount" Type="Long"/>
</Attribute>
<Attribute Name="HexaCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Hexas in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="HexaCount" Type="Int"/>
<Parameter Name="HexaCount" Type="Long"/>
</Attribute>
<Attribute Name="PyramidCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Pyramids in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PyramidCount" Type="Int"/>
<Parameter Name="PyramidCount" Type="Long"/>
</Attribute>
<Attribute Name="PrismCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Prisms in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PrismCount" Type="Int"/>
<Parameter Name="PrismCount" Type="Long"/>
</Attribute>
<Attribute Name="PolyhedronCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Polyhedrons in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="PolyhedronCount" Type="Int"/>
<Parameter Name="PolyhedronCount" Type="Long"/>
</Attribute>
<Attribute Name="SubMeshCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of SubMeshs in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="SubMeshCount" Type="Int"/>
<Parameter Name="SubMeshCount" Type="Long"/>
</Attribute>
<Attribute Name="GroupCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Groups in the Mesh.</UserDocu>
</Documentation>
<Parameter Name="GroupCount" Type="Int"/>
<Parameter Name="GroupCount" Type="Long"/>
</Attribute>
<Attribute Name="Groups" ReadOnly="true">
<Documentation>
Expand Down

0 comments on commit 5c0bcf6

Please sign in to comment.