Home | History | Annotate | Download | only in mzscheme
      1 /* -----------------------------------------------------------------------------
      2  * std_common.i
      3  *
      4  * SWIG typemaps for STL - common utilities
      5  * ----------------------------------------------------------------------------- */
      6 
      7 %include <std/std_except.i>
      8 
      9 %apply size_t { std::size_t };
     10 
     11 %{
     12 #include <string>
     13 
     14 std::string swig_scm_to_string(Scheme_Object* x) {
     15     return std::string(SCHEME_STR_VAL(x));
     16 }
     17 Scheme_Object* swig_make_string(const std::string& s) {
     18     return scheme_make_string(s.c_str());
     19 }
     20 %}
     21