]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix the compilation error by reverting "Fix crashes in unit-tests related to incorrec...
authorArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Wed, 13 May 2020 06:30:43 +0000 (09:30 +0300)
committerArtem Zhidkov <Artem.Zhidkov@opencascade.com>
Wed, 13 May 2020 06:30:43 +0000 (09:30 +0300)
This reverts commit da6063794500a9eef94e628e40d9155f55cbf3f7.

src/Events/Events.i
src/ModelAPI/ModelAPI.i

index c623fd1e4c24172d3aff5726adc6e0bbcc634510..e395be12ea0f189f6d53dd9b2659ea6a4996bf21 100644 (file)
 // standard definitions
 %include "typemaps.i"
 %include "std_string.i"
-%include "std_shared_ptr.i"
 
 // directors
 %feature("director") Events_Listener;
 
-%shared_ptr(Events_InfoMessage)
-%shared_ptr(Events_Message)
-%shared_ptr(Events_MessageGroup)
-
 // all supported interfaces
 %include "Events_Message.h"
 %include "Events_InfoMessage.h"
index ca786a2a6fb0a7cac7ad45aff0c66110c33ec894..068fd4d7a2e75380e997f60ab24545b0a696f0d6 100644 (file)
@@ -97,7 +97,6 @@
 %shared_ptr(ModelAPI_ResultField)
 %shared_ptr(ModelAPI_ResultParameter)
 %shared_ptr(ModelAPI_ResultCompSolid)
-%shared_ptr(ModelAPI_ObjectUpdatedMessage)
 
 %typecheck(SWIG_TYPECHECK_POINTER) const ModelAPI_AttributeTables::Value {
   $1 = (PyFloat_Check($input) || PyLong_Check($input) || PyUnicode_Check($input) || PyBool_Check($input)) ? 1 : 0;
@@ -197,7 +196,11 @@ template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr
 %template(modelAPI_ResultGroup) shared_ptr_cast<ModelAPI_ResultGroup, ModelAPI_Result>;
 %template(modelAPI_ResultField) shared_ptr_cast<ModelAPI_ResultField, ModelAPI_Result>;
 
-%template(messageToUpdatedMessage) shared_ptr_cast<ModelAPI_ObjectUpdatedMessage, Events_Message>;
+%inline %{
+  ModelAPI_ObjectUpdatedMessage* messageToUpdatedMessage(std::shared_ptr<Events_Message> msg) {
+    return static_cast<ModelAPI_ObjectUpdatedMessage*>(msg.get());
+  }
+%}
 
 // Attribute casts
 %template(modelAPI_AttributeDocRef)        shared_ptr_cast<ModelAPI_AttributeDocRef, ModelAPI_Attribute>;