diff options
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/gnuradio-core.pc.in | 1 | ||||
-rw-r--r-- | gnuradio-core/src/lib/io/gr_message_source.i | 8 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_basic_block.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_hier_block2.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_hier_block2.i | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_msg_queue.i | 61 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.h | 2 | ||||
-rw-r--r-- | gnuradio-core/src/lib/runtime/gr_top_block.i | 33 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio.i | 19 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_filter.i | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_general.i | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_gengen.i | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_hier.i | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_io.i | 10 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gnuradio_core_runtime.i | 25 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/gr_swig_block_magic.i | 18 |
16 files changed, 5 insertions, 218 deletions
diff --git a/gnuradio-core/gnuradio-core.pc.in b/gnuradio-core/gnuradio-core.pc.in index 46e4dc379..2de9a32e7 100644 --- a/gnuradio-core/gnuradio-core.pc.in +++ b/gnuradio-core/gnuradio-core.pc.in @@ -2,7 +2,6 @@ prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@/gnuradio -guile_load_path=@prefix@/share/guile/site Name: gnuradio-core Description: GNU Software Radio toolkit diff --git a/gnuradio-core/src/lib/io/gr_message_source.i b/gnuradio-core/src/lib/io/gr_message_source.i index e4e2016d0..8a9c762d0 100644 --- a/gnuradio-core/src/lib/io/gr_message_source.i +++ b/gnuradio-core/src/lib/io/gr_message_source.i @@ -22,14 +22,6 @@ GR_SWIG_BLOCK_MAGIC(gr,message_source); -#ifdef SWIGGUILE -// Rename these. Without this, the primitive bindings are OK, but the -// goops bindings try to create a bogus generic-function... -// See core.scm for the second part of the workaround. -%rename(message_source_limit_ctor) gr_make_message_source(size_t itemsize, int msgq_limit); -%rename(message_source_msgq_ctor) gr_make_message_source(size_t itemsize, gr_msg_queue_sptr msgq); -#endif - gr_message_source_sptr gr_make_message_source (size_t itemsize, int msgq_limit=0); gr_message_source_sptr gr_make_message_source (size_t itemsize, gr_msg_queue_sptr msgq); diff --git a/gnuradio-core/src/lib/runtime/gr_basic_block.h b/gnuradio-core/src/lib/runtime/gr_basic_block.h index 2adca8ccb..7e95509e2 100644 --- a/gnuradio-core/src/lib/runtime/gr_basic_block.h +++ b/gnuradio-core/src/lib/runtime/gr_basic_block.h @@ -103,7 +103,7 @@ public: std::string name() const { return d_name; } gr_io_signature_sptr input_signature() const { return d_input_signature; } gr_io_signature_sptr output_signature() const { return d_output_signature; } - gr_basic_block_sptr to_basic_block(); // Needed for Python/Guile type coercion + gr_basic_block_sptr to_basic_block(); // Needed for Python type coercion /*! * \brief Confirm that ninputs and noutputs is an acceptable combination. diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.h b/gnuradio-core/src/lib/runtime/gr_hier_block2.h index 9652f6bf4..12bcf10e7 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.h +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.h @@ -150,7 +150,7 @@ public: // ignored by the user. gr_flat_flowgraph_sptr flatten() const; - gr_hier_block2_sptr to_hier_block2(); // Needed for Python/Guile type coercion + gr_hier_block2_sptr to_hier_block2(); // Needed for Python type coercion }; inline gr_hier_block2_sptr cast_to_hier_block2_sptr(gr_basic_block_sptr block) { diff --git a/gnuradio-core/src/lib/runtime/gr_hier_block2.i b/gnuradio-core/src/lib/runtime/gr_hier_block2.i index 32b656e24..4fa7c3bc0 100644 --- a/gnuradio-core/src/lib/runtime/gr_hier_block2.i +++ b/gnuradio-core/src/lib/runtime/gr_hier_block2.i @@ -63,5 +63,5 @@ public: void lock(); void unlock(); - gr_hier_block2_sptr to_hier_block2(); // Needed for Python/Guile type coercion + gr_hier_block2_sptr to_hier_block2(); // Needed for Python type coercion }; diff --git a/gnuradio-core/src/lib/runtime/gr_msg_queue.i b/gnuradio-core/src/lib/runtime/gr_msg_queue.i index 0a4eda78a..2a78253b3 100644 --- a/gnuradio-core/src/lib/runtime/gr_msg_queue.i +++ b/gnuradio-core/src/lib/runtime/gr_msg_queue.i @@ -105,64 +105,3 @@ gr_msg_queue_sptr.insert_tail = gr_py_msg_queue__insert_tail gr_msg_queue_sptr.handle = gr_py_msg_queue__insert_tail %} #endif // SWIGPYTHON - -/* - * Similar trickery as above, only this time for Guile - */ -#ifdef SWIGGUILE - -%{ - struct arg_holder { - gr_msg_queue_sptr q; - gr_message_sptr msg; - }; - - static void * - insert_tail_shim(void *arg) - { - arg_holder *a = (arg_holder *)arg; - a->q->insert_tail(a->msg); - return 0; - } - - static void * - delete_head_shim(void *arg) - { - arg_holder *a = (arg_holder *)arg; - a->msg = a->q->delete_head(); - return 0; - } -%} - -%inline %{ - - // handle and insert_tail are equivalent - static void - handle(gr_msg_queue_sptr q, gr_message_sptr msg) - { - arg_holder a; - a.q = q; - a.msg = msg; - scm_without_guile(insert_tail_shim, (void *) &a); - } - - static void - insert_tail(gr_msg_queue_sptr q, gr_message_sptr msg) - { - arg_holder a; - a.q = q; - a.msg = msg; - scm_without_guile(insert_tail_shim, (void *) &a); - } - - static gr_message_sptr - delete_head(gr_msg_queue_sptr q) - { - arg_holder a; - a.q = q; - scm_without_guile(delete_head_shim, (void *) &a); - return a.msg; - } -%} - -#endif // SWIGGUILE diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.h b/gnuradio-core/src/lib/runtime/gr_top_block.h index 9d01ba3ef..e837700c3 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.h +++ b/gnuradio-core/src/lib/runtime/gr_top_block.h @@ -122,7 +122,7 @@ public: //! Set the maximum number of noutput_items in the flowgraph void set_max_noutput_items(int nmax); - gr_top_block_sptr to_top_block(); // Needed for Python/Guile type coercion + gr_top_block_sptr to_top_block(); // Needed for Python type coercion }; inline gr_top_block_sptr cast_to_top_block_sptr(gr_basic_block_sptr block) { diff --git a/gnuradio-core/src/lib/runtime/gr_top_block.i b/gnuradio-core/src/lib/runtime/gr_top_block.i index 70c627ffd..ea5534c17 100644 --- a/gnuradio-core/src/lib/runtime/gr_top_block.i +++ b/gnuradio-core/src/lib/runtime/gr_top_block.i @@ -51,7 +51,7 @@ public: int max_noutput_items(); void set_max_noutput_items(int nmax); - gr_top_block_sptr to_top_block(); // Needed for Python/Guile type coercion + gr_top_block_sptr to_top_block(); // Needed for Python type coercion }; #ifdef SWIGPYTHON @@ -73,34 +73,3 @@ void top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) %} #endif - -#ifdef SWIGGUILE - -%{ - struct tb_arg_holder { - gr_top_block_sptr tb; - }; - - static void * - tb_wait_shim(void *arg) - { - tb_arg_holder *a = (tb_arg_holder *)arg; - a->tb->wait(); - return 0; - } - -%} - -%inline %{ - - static void - top_block_wait_unlocked(gr_top_block_sptr r) throw (std::runtime_error) - { - tb_arg_holder a; - a.tb = r; - scm_without_guile(tb_wait_shim, (void *) &a); - } - -%} - -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i index 972d56c84..35dbd5359 100644 --- a/gnuradio-core/src/lib/swig/gnuradio.i +++ b/gnuradio-core/src/lib/swig/gnuradio.i @@ -39,30 +39,11 @@ %feature("autodoc","1"); -#ifdef SWIGGUILE -// Export constants and enums as scheme variables, not functions. -%feature("constasvar"); -#endif - // local file %include <gr_shared_ptr.i> - -// non-local SWIG files -#ifdef SWIGGUILE // Local overrides to support complex -// It's kind of screwy, but the target language subdir isn't -// searched automatically except for under ./swig_lib which -// doesn't really help us since we run swig in many directories -%include <guile/std_complex.i> -%include <guile/std_vector.i> -%include <std_common.i> -%include <std_string.i> -%include <std_map.i> -%include <std_pair.i> -#else %include <std_complex.i> %include <std_vector.i> %include <stl.i> -#endif %include <std_except.i> typedef std::complex<float> gr_complex; diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i b/gnuradio-core/src/lib/swig/gnuradio_core_filter.i index 952bf93b4..e9a44e54b 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_filter.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_filter.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "filter.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_filter" "scm_init_gnuradio_gnuradio_core_filter_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_general.i b/gnuradio-core/src/lib/swig/gnuradio_core_general.i index e39a0197a..33f97815e 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_general.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_general.i @@ -52,13 +52,3 @@ } %} - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_general" "scm_init_gnuradio_gnuradio_core_general_module") -%} - -%goops %{ -(use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i b/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i index 8753cd36b..b90a5bab3 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_gengen.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "gengen.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_gengen" "scm_init_gnuradio_gnuradio_core_gengen_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i b/gnuradio-core/src/lib/swig/gnuradio_core_hier.i index bb9c71f53..141d9b163 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_hier.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_hier.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "hier.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_hier" "scm_init_gnuradio_gnuradio_core_hier_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_io.i b/gnuradio-core/src/lib/swig/gnuradio_core_io.i index d2fa0aede..522b12b34 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_io.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_io.i @@ -30,13 +30,3 @@ %include "gnuradio.i" // the common stuff %include "io.i" - -#if SWIGGUILE -%scheme %{ -(load-extension-global "libguile-gnuradio-gnuradio_core_io" "scm_init_gnuradio_gnuradio_core_io_module") -%} - -%goops %{ - (use-modules (gnuradio gnuradio_core_runtime)) -%} -#endif diff --git a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i b/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i index 7fcac5069..fb311d226 100644 --- a/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i +++ b/gnuradio-core/src/lib/swig/gnuradio_core_runtime.i @@ -32,28 +32,3 @@ %include "gnuradio.i" // the common stuff %include "runtime.i" - - -#if SWIGGUILE -%scheme %{ - -;; Load our gsubr that loads libraries using the RTLD_GLOBAL option -(load-extension "libguile-gnuradio-dynl-global" "scm_init_gnuradio_dynl_global_module") - -;; Define load-extension-global in module '(guile) -(module-define! (resolve-module '(guile)) - 'load-extension-global - (lambda (lib init) - (dynamic-call init (dynamic-link-global lib)))) - -;; Use load-extension-global to load our swig modules -(load-extension-global "libguile-gnuradio-gnuradio_core_runtime" "scm_init_gnuradio_gnuradio_core_runtime_module") -%} - -%goops %{ -(use-modules (gnuradio export-safely)) -(re-export export-syms-if-not-imported-gf) -(re-export-syntax export-safely) -(re-export re-export-all) -%} -#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 a080c2b27..79055bd95 100644 --- a/gnuradio-core/src/lib/swig/gr_swig_block_magic.i +++ b/gnuradio-core/src/lib/swig/gr_swig_block_magic.i @@ -40,21 +40,3 @@ FULL_NAME ## _sptr.__repr__ = lambda self: "<gr_block %s (%d)>" % (self.name(), %} %enddef #endif - -#ifdef SWIGGUILE -#ifdef IN_GNURADIO_CORE // normal behavior -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, FULL_NAME) -_GR_SWIG_BLOCK_MAGIC_HELPER_COMMON(PKG, BASE_NAME, FULL_NAME) -/* FIXME May want to add something here to get a friendlier printed representation */ -%enddef -#else // Don't strip PKG from name -%define _GR_SWIG_BLOCK_MAGIC_HELPER(PKG, BASE_NAME, FULL_NAME) -class FULL_NAME; -typedef boost::shared_ptr<FULL_NAME> FULL_NAME ## _sptr; -%template(FULL_NAME ## _sptr) boost::shared_ptr<FULL_NAME>; -%ignore FULL_NAME; -%rename(FULL_NAME) PKG ## _make_ ## BASE_NAME; -/* FIXME May want to add something here to get a friendlier printed representation */ -%enddef -#endif -#endif |