Dealing with 32bit compile error of Voronoi interface.

This commit is contained in:
Markus Lampert
2020-10-04 22:44:45 -07:00
parent 78e1adbcb1
commit 7ea1bb0cb7
4 changed files with 15 additions and 5 deletions

View File

@@ -122,7 +122,8 @@ Py::Long VoronoiCellPy::getIndex(void) const {
Py::Long VoronoiCellPy::getColor(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
return Py::Long(c->ptr->color() & Voronoi::ColorMask);
Voronoi::color_type color = c->ptr->color() & Voronoi::ColorMask;
return Py::Long(color);
}
return Py::Long(0);
}
@@ -134,7 +135,8 @@ void VoronoiCellPy::setColor(Py::Long color) {
Py::Long VoronoiCellPy::getSourceIndex(void) const
{
VoronoiCell *c = getVoronoiCellFromPy(this);
return Py::Long(c->ptr->source_index());
long index = c->ptr->source_index();
return Py::Long(index);
}
Py::Int VoronoiCellPy::getSourceCategory(void) const