From 86078512d62f1c0d358682b5739bdb615568b06a Mon Sep 17 00:00:00 2001 From: spo Date: Mon, 1 Jun 2015 14:12:57 +0300 Subject: [PATCH] Fix: SWIG std::list> problem --- src/GeomAlgoAPI/GeomAlgoAPI.i | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/GeomAlgoAPI/GeomAlgoAPI.i b/src/GeomAlgoAPI/GeomAlgoAPI.i index f53434b4c..fc6f1b6ce 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI.i +++ b/src/GeomAlgoAPI/GeomAlgoAPI.i @@ -41,4 +41,7 @@ %include "GeomAlgoAPI_ShapeProps.h" %include "GeomAlgoAPI_SketchBuilder.h" -%template(ShapeList) std::list >; \ No newline at end of file +%typemap(out) std::list< std::shared_ptr< GeomAPI_Shape > >::value_type & { + $result = SWIG_NewPointerObj(SWIG_as_voidptr(new std::shared_ptr(*$1)), $descriptor(std::shared_ptr *), SWIG_POINTER_OWN | 0 ); +} +%template(ShapeList) std::list >; -- 2.39.2