From: azv Date: Thu, 23 Aug 2018 12:33:08 +0000 (+0300) Subject: Fix issues after porting the new Dump to the latest version X-Git-Tag: V9_2_0a1~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6058cc97fb3387c008d153e4ea2b3331d7f195bd;p=modules%2Fshaper.git Fix issues after porting the new Dump to the latest version --- 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