Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* SWIG typemaps for C++ */ |
2 | ||
3 | /* By Marcio Luis Teixeira <marciot@holly.colostate.edu>: */ | |
4 | ||
5 | %typemap(guile,out) string, std::string { | |
6 | $result = gh_str02scm(const_cast<char*>($1.c_str())); | |
7 | } | |
8 | %typemap(guile,in) string, std::string { | |
9 | $1 = SWIG_scm2str($input); | |
10 | } | |
11 | ||
12 | %typemap(guile,out) complex, complex<double>, std::complex<double> { | |
13 | $result = scm_make_rectangular( gh_double2scm ($1.real ()), | |
14 | gh_double2scm ($1.imag ()) ); | |
15 | } | |
16 | %typemap(guile,in) complex, complex<double>, std::complex<double> { | |
17 | $1 = std::complex<double>( gh_scm2double (scm_real_part ($input)), | |
18 | gh_scm2double (scm_imag_part ($input)) ); | |
19 | } | |
20 |