From 6058cc97fb3387c008d153e4ea2b3331d7f195bd Mon Sep 17 00:00:00 2001 From: azv Date: Thu, 23 Aug 2018 15:33:08 +0300 Subject: [PATCH] Fix issues after porting the new Dump to the latest version --- src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp | 5 ++--- src/ModelHighAPI/ModelHighAPI_Tools.cpp | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp index 7921c27df..5895daf8e 100644 --- a/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp +++ b/src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -171,8 +171,7 @@ namespace ModelGeomAlgo_Shape std::shared_ptr aSketchEdges = std::dynamic_pointer_cast(aCurShape); if (theShapeType != GeomAPI_Shape::COMPOUND || !aSketchEdges) { - ResultCompSolidPtr aCompSolid = - std::dynamic_pointer_cast(*aResIt); + ResultBodyPtr aCompSolid = std::dynamic_pointer_cast(*aResIt); if (aCompSolid) { // process solids int aNbSolids = aCompSolid->numberOfSubs(); diff --git a/src/ModelHighAPI/ModelHighAPI_Tools.cpp b/src/ModelHighAPI/ModelHighAPI_Tools.cpp index 901ed0f67..58e9748f1 100644 --- a/src/ModelHighAPI/ModelHighAPI_Tools.cpp +++ b/src/ModelHighAPI/ModelHighAPI_Tools.cpp @@ -494,8 +494,8 @@ static bool checkDump(SessionPtr theSession, // execute the dumped PyGILState_STATE gstate = PyGILState_Ensure(); /* acquire python thread */ static char aReadMode[] = "r"; - PyObject* PyFileObject = PyFile_FromString(theFilename, aReadMode); - PyRun_SimpleFileEx(PyFile_AsFile(PyFileObject), theFilename, 1); + FILE* PyFileObject = _Py_fopen(theFilename, aReadMode); + PyRun_SimpleFileEx(PyFileObject, theFilename, 1); PyGILState_Release(gstate); /* release python thread */ // compare with the stored data -- 2.39.2