summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib')
-rw-r--r--gnuradio-core/src/lib/runtime/gr_basic_block.i6
-rw-r--r--gnuradio-core/src/lib/runtime/gr_block.i5
-rw-r--r--gnuradio-core/src/lib/runtime/gr_msg_queue.i5
-rw-r--r--gnuradio-core/src/lib/swig/gr_swig_block_magic.i5
4 files changed, 21 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.i b/gnuradio-core/src/lib/runtime/gr_basic_block.i
index 60e08aac3..847ef3689 100644
--- a/gnuradio-core/src/lib/runtime/gr_basic_block.i
+++ b/gnuradio-core/src/lib/runtime/gr_basic_block.i
@@ -47,6 +47,12 @@ public:
%rename(block_ncurrently_allocated) gr_basic_block_ncurrently_allocated;
long gr_basic_block_ncurrently_allocated();
+#ifdef SWIGPYTHON
%pythoncode %{
gr_basic_block_sptr.__repr__ = lambda self: "<gr_basic_block %s (%d)>" % (self.name(), self.unique_id ())
%}
+#endif
+
+#ifdef SWIGGUILE
+#endif
+
diff --git a/gnuradio-core/src/lib/runtime/gr_block.i b/gnuradio-core/src/lib/runtime/gr_block.i
index c2e2aa4b8..d89e638b2 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.i
+++ b/gnuradio-core/src/lib/runtime/gr_block.i
@@ -54,7 +54,12 @@ class gr_block : public gr_basic_block {
void set_detail (gr_block_detail_sptr detail) { d_detail = detail; }
};
+#ifdef SWIGPYTHON
%pythoncode %{
gr_block_sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ())
gr_block_sptr.block = lambda self: self
%}
+#endif
+
+#ifdef SWIGGUILE
+#endif
diff --git a/gnuradio-core/src/lib/runtime/gr_msg_queue.i b/gnuradio-core/src/lib/runtime/gr_msg_queue.i
index 9ca92b6ec..64aea602a 100644
--- a/gnuradio-core/src/lib/runtime/gr_msg_queue.i
+++ b/gnuradio-core/src/lib/runtime/gr_msg_queue.i
@@ -97,9 +97,14 @@ public:
}
%}
+#ifdef SWIGPYTHON
// smash in new python delete_head and insert_tail methods...
%pythoncode %{
gr_msg_queue_sptr.delete_head = gr_py_msg_queue__delete_head
gr_msg_queue_sptr.insert_tail = gr_py_msg_queue__insert_tail
gr_msg_queue_sptr.handle = gr_py_msg_queue__insert_tail
%}
+#endif
+
+#ifdef SWIGGUILE
+#endif
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 78e838012..e25afbdb5 100644
--- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i
+++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i
@@ -30,10 +30,15 @@ typedef boost::shared_ptr<NAME> NAME ## _sptr;
%template(NAME ## _sptr) boost::shared_ptr<NAME>;
%rename(BASE_NAME) PKG ## _make_ ## BASE_NAME;
+#ifdef SWIGPYTHON
%pythoncode %{
NAME ## _sptr.block = lambda self: NAME ## _block (self)
NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), self.unique_id ())
%}
+#endif
%ignore NAME;
%enddef
+
+#ifdef SWIGGUILE
+#endif