Unified voronoi indices for python to be of type long

This commit is contained in:
Markus Lampert
2020-09-29 12:54:57 -07:00
committed by sliptonic
parent d29b2dcd3f
commit 68fecf9a90
6 changed files with 18 additions and 18 deletions

View File

@@ -111,12 +111,12 @@ VoronoiCell* getVoronoiCellFromPy(const VoronoiCellPy *c, PyObject *args = 0) {
return self;
}
Py::Int VoronoiCellPy::getIndex(void) const {
Py::Long VoronoiCellPy::getIndex(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Int(c->dia->index(c->ptr));
return Py::Long(c->dia->index(c->ptr));
}
return Py::Int(-1);
return Py::Long(-1);
}
Py::Long VoronoiCellPy::getColor(void) const {
@@ -131,10 +131,10 @@ void VoronoiCellPy::setColor(Py::Long color) {
getCellFromPy(this)->color(int(color) & Voronoi::ColorMask);
}
Py::Int VoronoiCellPy::getSourceIndex(void) const
Py::Long VoronoiCellPy::getSourceIndex(void) const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::Int(c->ptr->source_index());
return Py::Long(c->ptr->source_index());
}
Py::Int VoronoiCellPy::getSourceCategory(void) const