From da6063794500a9eef94e628e40d9155f55cbf3f7 Mon Sep 17 00:00:00 2001 From: Artem Zhidkov Date: Wed, 13 May 2020 00:16:58 +0300 Subject: [PATCH] Fix crashes in unit-tests related to incorrect message processing from Python. --- src/Events/Events.i | 5 +++++ src/ModelAPI/ModelAPI.i | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Events/Events.i b/src/Events/Events.i index e395be12e..c623fd1e4 100644 --- a/src/Events/Events.i +++ b/src/Events/Events.i @@ -43,10 +43,15 @@ // 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" diff --git a/src/ModelAPI/ModelAPI.i b/src/ModelAPI/ModelAPI.i index de2ef3085..ca786a2a6 100644 --- a/src/ModelAPI/ModelAPI.i +++ b/src/ModelAPI/ModelAPI.i @@ -97,6 +97,7 @@ %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; -- 2.39.2