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.

27 lines
736 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. * std_common.i
  6. *
  7. * SWIG typemaps for STL - common utilities
  8. * ----------------------------------------------------------------------------- */
  9. %include <std/std_except.i>
  10. %apply size_t { std::size_t };
  11. #define SWIG_bool2scm(b) gh_bool2scm(b ? 1 : 0)
  12. #define SWIG_string2scm(s) gh_str02scm(s.c_str())
  13. %{
  14. #include <string>
  15. inline std::string SWIG_scm2string(SCM x) {
  16. char* temp;
  17. temp = SWIG_scm2str(x);
  18. std::string s(temp);
  19. if (temp) SWIG_free(temp);
  20. return s;
  21. }
  22. %}