Using python type conversion to return voronoi element color

This commit is contained in:
Markus Lampert
2020-10-10 18:10:06 -07:00
parent aa32b9c6af
commit 574bdd2d09
3 changed files with 3 additions and 3 deletions

View File

@@ -125,7 +125,7 @@ Py::Long VoronoiVertexPy::getColor(void) const {
VoronoiVertex *v = getVoronoiVertexPtr();
if (v->isBound()) {
Voronoi::color_type color = v->ptr->color() & Voronoi::ColorMask;
return Py::Long(color);
return Py::Long(PyLong_FromSize_t(color));
}
return Py::Long(0);
}