Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | // |
2 | // SWIG typemaps for STL - common utilities | |
3 | // Luigi Ballabio | |
4 | // Aug 3, 2002 | |
5 | // | |
6 | // MzScheme implementation | |
7 | ||
8 | %include <std/std_except.i> | |
9 | ||
10 | %apply size_t { std::size_t }; | |
11 | ||
12 | %{ | |
13 | #include <string> | |
14 | ||
15 | std::string swig_scm_to_string(Scheme_Object* x) { | |
16 | return std::string(SCHEME_STR_VAL(x)); | |
17 | } | |
18 | Scheme_Object* swig_make_string(const std::string& s) { | |
19 | return scheme_make_string(s.c_str()); | |
20 | } | |
21 | %} |