From 66070c662fc3b6008a0fcfeda34600c3bf20faa3 Mon Sep 17 00:00:00 2001 From: mos Date: Wed, 15 Nov 2023 11:55:12 +0100 Subject: [PATCH] fix python get value rotation are a Long . remove old check python >=3.5 -> freecad require python 3.6 --- src/Base/RotationPyImp.cpp | 2 +- src/Tools/generateTemplates/templateClassPyExport.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Base/RotationPyImp.cpp b/src/Base/RotationPyImp.cpp index 80c6eb180b..d9d7e9e10f 100644 --- a/src/Base/RotationPyImp.cpp +++ b/src/Base/RotationPyImp.cpp @@ -635,7 +635,7 @@ PyObject* RotationPy::number_power_handler(PyObject* self, PyObject* other, PyOb } Rotation a = static_cast(self)->value(); - long b = Py::Int(other); + long b = Py::Long(other); Vector3d axis; double rfAngle {}; diff --git a/src/Tools/generateTemplates/templateClassPyExport.py b/src/Tools/generateTemplates/templateClassPyExport.py index a9c4df8bfd..30a20f4159 100644 --- a/src/Tools/generateTemplates/templateClassPyExport.py +++ b/src/Tools/generateTemplates/templateClassPyExport.py @@ -465,10 +465,8 @@ PyNumberMethods @self.export.Name@::Number[] = { { nullptr, /*nb_inplace_floor_divide*/ nullptr, /*nb_inplace_true_divide*/ nullptr /*nb_index*/ -#if PY_VERSION_HEX >= 0x03050000 ,nullptr /*nb_matrix_multiply*/ ,nullptr /*nb_inplace_matrix_multiply*/ -#endif } }; -