python: use const_cast<> to new() python types.

This commit is contained in:
Jacob Oursland
2025-04-16 20:31:15 -07:00
parent 5c251e73ac
commit 0b29aa596a
9 changed files with 14 additions and 14 deletions

View File

@@ -863,7 +863,7 @@ PyObject* GeometrySurfacePy::intersect(PyObject *args) const
GeometryCurvePy* curve = static_cast<GeometryCurvePy*>(p);
PyObject* t = PyTuple_New(2);
Py_INCREF(this);
PyTuple_SetItem(t, 0, this);
PyTuple_SetItem(t, 0, const_cast<GeometrySurfacePy*>(this));
PyTuple_SetItem(t, 1, PyFloat_FromDouble(prec));
return curve->intersectCS(t);
} else {