From 27d1af7c7511addac638856bc2ffd3cda5e7ab0c Mon Sep 17 00:00:00 2001 From: Eric Blossom Date: Sat, 23 Oct 2010 20:59:54 -0700 Subject: Add %typecheck for complex. Fixes problem with moving-average-cc. --- gnuradio-core/src/lib/swig/guile/std_complex.i | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnuradio-core') 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); %typemaps_primitive(%checkcode(CPLXFLT), std::complex); + +%typecheck(SWIG_TYPECHECK_COMPLEX) + std::complex, std::complex, + const std::complex &, const std::complex & +{ + $1 = scm_is_complex($input) ? 1 : 0; +} -- cgit