Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
911 B

  1. /* -----------------------------------------------------------------------------
  2. * See the LICENSE file for information on copyright, usage and redistribution
  3. * of SWIG, and the README file for authors - http://www.swig.org/release.html.
  4. *
  5. * cplusplus.i
  6. *
  7. * SWIG typemaps for C++
  8. * ----------------------------------------------------------------------------- */
  9. %typemap(guile,out) string, std::string {
  10. $result = gh_str02scm(const_cast<char*>($1.c_str()));
  11. }
  12. %typemap(guile,in) string, std::string {
  13. $1 = SWIG_scm2str($input);
  14. }
  15. %typemap(guile,out) complex, complex<double>, std::complex<double> {
  16. $result = scm_make_rectangular( gh_double2scm ($1.real ()),
  17. gh_double2scm ($1.imag ()) );
  18. }
  19. %typemap(guile,in) complex, complex<double>, std::complex<double> {
  20. $1 = std::complex<double>( gh_scm2double (scm_real_part ($input)),
  21. gh_scm2double (scm_imag_part ($input)) );
  22. }