diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-22 02:01:57 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-12-22 02:01:57 +0000 |
commit | c8a4a62c32c9f6ce43d99dfa468561befa6de06c (patch) | |
tree | e08e74fba3ff91905855d802827db39278a8d15d /linux-x86/share/swig/ruby/std_complex.i | |
parent | e3f6a8c059b94f30f7184a7d335876f8a13a2366 (diff) | |
parent | e905be252a53d20c52bd9e59df3ff8fdd46b9eab (diff) | |
download | build-tools-c8a4a62c32c9f6ce43d99dfa468561befa6de06c.tar.gz |
Snap for 11203489 from e905be252a53d20c52bd9e59df3ff8fdd46b9eab to common-android14-6.1-2023-05-exp-releasecommon-android14-6.1-2023-05-exp-release
Change-Id: I4301094dd1f97f9f1411662e55edf3e8120a476d
Signed-off-by: Coastguard Worker <android-build-coastguard-worker@google.com>
Diffstat (limited to 'linux-x86/share/swig/ruby/std_complex.i')
-rw-r--r-- | linux-x86/share/swig/ruby/std_complex.i | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linux-x86/share/swig/ruby/std_complex.i b/linux-x86/share/swig/ruby/std_complex.i new file mode 100644 index 0000000..ef4e8a1 --- /dev/null +++ b/linux-x86/share/swig/ruby/std_complex.i @@ -0,0 +1,29 @@ +/* + * STD C++ complex typemaps + */ + +%include <rubycomplex.swg> + +%{ +#include <complex> +%} + +namespace std { + %naturalvar complex; + template<typename T> class complex; + %template() complex<double>; + %template() complex<float>; +} + +/* defining the complex as/from converters */ + +%swig_cplxdbl_convn(std::complex<double>, std::complex<double>, std::real, std::imag) +%swig_cplxflt_convn(std::complex<float>, std::complex<float>, std::real, std::imag) + +/* defining the typemaps */ + +%typemaps_primitive(%checkcode(CPLXDBL), std::complex<double>); +%typemaps_primitive(%checkcode(CPLXFLT), std::complex<float>); + + + |