Skip to content

Commit

Permalink
Merge pull request #3949 from mlampert/bugfix/path-voronoi-32bit-pyth…
Browse files Browse the repository at this point in the history
…on-build

PATH: 32bit build bugfix - Using python type conversion to return voronoi element color
  • Loading branch information
sliptonic committed Oct 12, 2020
2 parents 5609b38 + 101a0e0 commit 69963f3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Mod/Path/App/VoronoiCellPyImp.cpp
Expand Up @@ -123,7 +123,7 @@ Py::Long VoronoiCellPy::getColor(void) const {
VoronoiCell *c = getVoronoiCellPtr();
if (c->isBound()) {
Voronoi::color_type color = c->ptr->color() & Voronoi::ColorMask;
return Py::Long(color);
return Py::Long(PyLong_FromSize_t(color));
}
return Py::Long(0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/App/VoronoiEdgePyImp.cpp
Expand Up @@ -142,7 +142,7 @@ Py::Long VoronoiEdgePy::getColor(void) const {
VoronoiEdge *e = getVoronoiEdgePtr();
if (e->isBound()) {
Voronoi::color_type color = e->ptr->color() & Voronoi::ColorMask;
return Py::Long(color);
return Py::Long(PyLong_FromSize_t(color));
}
return Py::Long(0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Path/App/VoronoiVertexPyImp.cpp
Expand Up @@ -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);
}
Expand Down

0 comments on commit 69963f3

Please sign in to comment.