diff options
author | Johnathan Corgan | 2012-04-21 13:17:52 -0700 |
---|---|---|
committer | Johnathan Corgan | 2012-04-21 13:17:52 -0700 |
commit | 2c7ea13282add42e8d10d0ced2ccd69bb4d351f0 (patch) | |
tree | a43827f505fb652cfb603e33c280becc49960fca | |
parent | 065d37947aafb0c9f460cb13e6eb2f88035210e1 (diff) | |
parent | 8e8335e2e4f20e3015956b30f05013913cb3fc54 (diff) | |
download | gnuradio-2c7ea13282add42e8d10d0ced2ccd69bb4d351f0.tar.gz gnuradio-2c7ea13282add42e8d10d0ced2ccd69bb4d351f0.tar.bz2 gnuradio-2c7ea13282add42e8d10d0ced2ccd69bb4d351f0.zip |
Merge branch 'merge/core-swig-magic'
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio.i | 3 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gr_swig_block_magic.i | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i index 239223851..3a421ad5d 100644 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ b/gnuradio-core/src/lib/swig/gnuradio.i @@ -20,6 +20,9 @@ * Boston, MA 02110-1301, USA. */ +// Disable warning about base class types +#pragma SWIG nowarn=401 + //////////////////////////////////////////////////////////////////////// // gnuradio.i // SWIG interface definition diff --git a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i index cdc9fbe49..4016ae772 100644 --- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i +++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2004,2010 Free Software Foundation, Inc. + * Copyright 2004,2010,2012 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -40,3 +40,11 @@ FULL_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), %} %enddef #endif + +%define GR_SWIG_BLOCK_MAGIC2(PKG, BASE_NAME) +%template(BASE_NAME ## _sptr) boost::shared_ptr<gr:: ## PKG ## :: ## BASE_NAME>; +%pythoncode %{ +BASE_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id()) +BASE_NAME = BASE_NAME.make; +%} +%enddef |