diff options
Diffstat (limited to 'python')
-rw-r--r-- | python/gras/CMakeLists.txt | 1 | ||||
-rw-r--r-- | python/gras/GRASElements.i | 16 |
2 files changed, 6 insertions, 11 deletions
diff --git a/python/gras/CMakeLists.txt b/python/gras/CMakeLists.txt index cd0c9be..5386096 100644 --- a/python/gras/CMakeLists.txt +++ b/python/gras/CMakeLists.txt @@ -15,6 +15,7 @@ find_package(Boost) #for headers ######################################################################## list(APPEND GR_SWIG_INCLUDE_DIRS ${GRAS_INCLUDE_DIRS}) list(APPEND GR_SWIG_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}) +set(GR_SWIG_LIBRARIES gras) GR_SWIG_MAKE(GRASElements GRASElements.i) GR_SWIG_INSTALL( diff --git a/python/gras/GRASElements.i b/python/gras/GRASElements.i index 1217ae8..12854a9 100644 --- a/python/gras/GRASElements.i +++ b/python/gras/GRASElements.i @@ -34,15 +34,11 @@ } %{ - -#include <gras/element.hpp> #include <gras/hier_block.hpp> #include <gras/top_block.hpp> #include <gras/io_signature.hpp> - %} - //////////////////////////////////////////////////////////////////////// //helps with funny swig error for io signature //////////////////////////////////////////////////////////////////////// @@ -55,10 +51,7 @@ //////////////////////////////////////////////////////////////////////// // pull in hier and top interface //////////////////////////////////////////////////////////////////////// -%include <boost_shared_ptr.i> -%shared_ptr(gras::ElementImpl) - -%include <gras/element.hpp> +%include <gras/element.i> %include <gras/hier_block.hpp> %include <gras/top_block.hpp> %include <gras/io_signature.hpp> @@ -138,10 +131,11 @@ class TopBlock(TopBlockPython): def disconnect(self, *args): return internal_connect__(TopBlockPython.disconnect, self, *args) -class HierBlock(HierBlock): +HierBlockPython = HierBlock + +class HierBlock(HierBlockPython): def __init__(self, *args, **kwargs): - HierBlock.__init__(self, *args, **kwargs) - self._hb = self #backwards compat + HierBlockPython.__init__(self, *args, **kwargs) def connect(self, *args): return internal_connect__(HierBlock.connect, self, *args) |