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 CAML_VALUE SwigString_FromString(const std::string& s) { 14 return caml_val_string((char *)s.c_str()); 15 } 16 std::string SwigString_AsString(CAML_VALUE o) { 17 return std::string((char *)caml_ptr_val(o,0)); 18 } 19 %} 20