summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/lib/swig/guile/std_complex.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/swig/guile/std_complex.i b/gnuradio-core/src/lib/swig/guile/std_complex.i
index cafcfeae3..2a5c72aa2 100644
--- a/gnuradio-core/src/lib/swig/guile/std_complex.i
+++ b/gnuradio-core/src/lib/swig/guile/std_complex.i
@@ -28,3 +28,10 @@
%typemaps_primitive(%checkcode(CPLXDBL), std::complex<double>);
%typemaps_primitive(%checkcode(CPLXFLT), std::complex<float>);
+
+%typecheck(SWIG_TYPECHECK_COMPLEX)
+ std::complex<float>, std::complex<double>,
+ const std::complex<float> &, const std::complex<double> &
+{
+ $1 = scm_is_complex($input) ? 1 : 0;
+}