From: Joel R. <jo...@gm...> - 2011-01-04 18:53:01
|
Folks, I've updated the OCaml bindings and they mostly work, except for std::string example in Examples/ocaml/stl. For some strange reason the default typemap is being used and I get { /* %typemap(in) SWIGTYPE & */ arg2 = (std::basic_string< char > *) caml_ptr_val(caml_list_nth(args,1),SWIGTYPE_p_std__basic_stringT_char_t); } The example I'm working with pushes strings into a std::vector<std::string > but this typemap from std_string.i is skipped: %typemap(in) const string & (std::string temp) { if (caml_ptr_check($input)) { temp.assign((char *)caml_ptr_val($input,0), caml_string_len($input)); $1 = &temp; } else { SWIG_exception(SWIG_TypeError, "string expected"); } } Any suggestions on what's going on here? Thanks, Joel --- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont |