Standardize on Py::Long type for Python bindings.

This commit is contained in:
tritao
2025-05-15 19:59:08 -03:00
committed by Adrián Insaurralde Avalos
parent 5391e21d4e
commit 010d37deda
44 changed files with 163 additions and 163 deletions
+4 -4
View File
@@ -1889,7 +1889,7 @@ PyObject* TopoShapePy::countElement(PyObject *args)
return nullptr;
PY_TRY {
return Py::new_reference_to(Py::Int((long)getTopoShapePtr()->countSubShapes(input)));
return Py::new_reference_to(Py::Long((long)getTopoShapePtr()->countSubShapes(input)));
}
PY_CATCH_OCC
}
@@ -2362,10 +2362,10 @@ PyObject* TopoShapePy::findSubShape(PyObject* args)
for (auto& s : getPyShapes(pyobj)) {
int index = getTopoShapePtr()->findShape(s.getShape());
if (index > 0) {
res.append(Py::TupleN(Py::String(s.shapeName()), Py::Int(index)));
res.append(Py::TupleN(Py::String(s.shapeName()), Py::Long(index)));
}
else {
res.append(Py::TupleN(Py::Object(), Py::Int(0)));
res.append(Py::TupleN(Py::Object(), Py::Long(0)));
}
}
if (PySequence_Check(pyobj)) {
@@ -2652,7 +2652,7 @@ PyObject* TopoShapePy::getElementHistory(PyObject* args)
Py_Return;
}
Py::Tuple ret(3);
ret.setItem(0, Py::Int(tag));
ret.setItem(0, Py::Long(tag));
std::string tmp;
ret.setItem(1, Py::String(original.appendToBuffer(tmp)));
Py::List pyHistory;