summaryrefslogtreecommitdiff
path: root/gnuradio-core/src/lib/swig/gnuradio.i
diff options
context:
space:
mode:
Diffstat (limited to 'gnuradio-core/src/lib/swig/gnuradio.i')
-rw-r--r--gnuradio-core/src/lib/swig/gnuradio.i31
1 files changed, 21 insertions, 10 deletions
diff --git a/gnuradio-core/src/lib/swig/gnuradio.i b/gnuradio-core/src/lib/swig/gnuradio.i
index e15a0059c..1856d5007 100644
--- a/gnuradio-core/src/lib/swig/gnuradio.i
+++ b/gnuradio-core/src/lib/swig/gnuradio.i
@@ -32,16 +32,35 @@
#include "gnuradio_swig_bug_workaround.h" // mandatory bug fix
#include <gr_types.h>
#include <stddef.h> // size_t
+#include <complex>
%}
%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
-%include <stl.i>
+#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;
@@ -59,6 +78,7 @@ namespace std {
%template() vector<int>;
%template() vector<float>;
%template() vector<double>;
+ // %template() std::complex<float>;
%template() vector< std::complex<float> >;
%template() vector< std::vector< unsigned char > >;
@@ -72,15 +92,6 @@ namespace std {
////////////////////////////////////////////////////////////////////////
-%constant int sizeof_char = sizeof(char);
-%constant int sizeof_short = sizeof(short);
-%constant int sizeof_int = sizeof(int);
-%constant int sizeof_float = sizeof(float);
-%constant int sizeof_double = sizeof(double);
-%constant int sizeof_gr_complex = sizeof(gr_complex);
-
-////////////////////////////////////////////////////////////////////////
-
#ifndef SW_RUNTIME
// import runtime.i for all but sw_runtime, since it needs to %include
%import <runtime.i>