diff options
Diffstat (limited to 'linux-x86/share/swig/mzscheme/std_common.i')
-rw-r--r-- | linux-x86/share/swig/mzscheme/std_common.i | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linux-x86/share/swig/mzscheme/std_common.i b/linux-x86/share/swig/mzscheme/std_common.i new file mode 100644 index 0000000..a83e273 --- /dev/null +++ b/linux-x86/share/swig/mzscheme/std_common.i @@ -0,0 +1,23 @@ +/* ----------------------------------------------------------------------------- + * std_common.i + * + * SWIG typemaps for STL - common utilities + * ----------------------------------------------------------------------------- */ + +%include <std/std_except.i> + +%apply size_t { std::size_t }; + +%{ +#include <string> + +SWIGINTERNINLINE +std::string swig_scm_to_string(Scheme_Object *x) { + return std::string(SCHEME_STR_VAL(x)); +} + +SWIGINTERNINLINE +Scheme_Object *swig_make_string(const std::string &s) { + return scheme_make_string(s.c_str()); +} +%} |