py3: Mesh: fix py3 Long/Int problem with python2
This commit is contained in:
parent
6c8c3dc71e
commit
d5348c60bc
|
@ -76,15 +76,10 @@ PyObject* FacetPy::unbound(PyObject *args)
|
|||
getFacetPtr()->Mesh = 0;
|
||||
Py_Return;
|
||||
}
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
|
||||
Py::Long FacetPy::getIndex(void) const
|
||||
{
|
||||
return Py::Long((long) getFacetPtr()->Index);
|
||||
#else
|
||||
Py::Int FacetPy::getIndex(void) const
|
||||
{
|
||||
return Py::Int((long) getFacetPtr()->Index);
|
||||
#endif
|
||||
}
|
||||
|
||||
Py::Boolean FacetPy::getBound(void) const
|
||||
|
|
|
@ -100,15 +100,9 @@ PyObject* MeshPointPy::move(PyObject *args)
|
|||
Py_Return;
|
||||
}
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
Py::Long MeshPointPy::getIndex(void) const
|
||||
{
|
||||
return Py::Long((long) getMeshPointPtr()->Index);
|
||||
#else
|
||||
Py::Int MeshPointPy::getIndex(void) const
|
||||
{
|
||||
return Py::Int((long) getMeshPointPtr()->Index);
|
||||
#endif
|
||||
}
|
||||
|
||||
Py::Boolean MeshPointPy::getBound(void) const
|
||||
|
|
|
@ -1766,7 +1766,7 @@ PyObject* MeshPy::getSegmentsByCurvature(PyObject *args)
|
|||
|
||||
return Py::new_reference_to(list);
|
||||
}
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
|
||||
Py::Long MeshPy::getCountPoints(void) const
|
||||
{
|
||||
return Py::Long((long)getMeshObjectPtr()->countPoints());
|
||||
|
@ -1781,22 +1781,6 @@ Py::Long MeshPy::getCountFacets(void) const
|
|||
{
|
||||
return Py::Long((long)getMeshObjectPtr()->countFacets());
|
||||
}
|
||||
#else
|
||||
Py::Int MeshPy::getCountPoints(void) const
|
||||
{
|
||||
return Py::Int((long)getMeshObjectPtr()->countPoints());
|
||||
}
|
||||
|
||||
Py::Int MeshPy::getCountEdges(void) const
|
||||
{
|
||||
return Py::Int((long)getMeshObjectPtr()->countEdges());
|
||||
}
|
||||
|
||||
Py::Int MeshPy::getCountFacets(void) const
|
||||
{
|
||||
return Py::Int((long)getMeshObjectPtr()->countFacets());
|
||||
}
|
||||
#endif
|
||||
|
||||
Py::Float MeshPy::getArea(void) const
|
||||
{
|
||||
|
|
|
@ -150,7 +150,7 @@ private:
|
|||
std::vector<unsigned long> segm;
|
||||
segm.reserve(list.size());
|
||||
for (unsigned int i=0; i<list.size(); i++) {
|
||||
segm.push_back((int)Py::Long(list[i]));
|
||||
segm.push_back((long)Py::Long(list[i]));
|
||||
}
|
||||
|
||||
std::list<std::vector<Base::Vector3f> > bounds;
|
||||
|
|
Loading…
Reference in New Issue
Block a user