std::string typemap modifications so they can be used with %apply for other string classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13120 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
49b6c39d98
commit
12a9671440
13 changed files with 37 additions and 33 deletions
|
|
@ -121,7 +121,7 @@ namespace std {
|
|||
// SWIG_exception(SWIG_TypeError, "string expected");
|
||||
// }
|
||||
|
||||
// %typemap(in) const string & (std::string temp) {
|
||||
// %typemap(in) const string & ($*1_ltype temp) {
|
||||
// if (caml_ptr_check($input)) {
|
||||
// temp.assign((char *)caml_ptr_val($input,0),
|
||||
// caml_string_len($input));
|
||||
|
|
@ -131,7 +131,7 @@ namespace std {
|
|||
// }
|
||||
// }
|
||||
|
||||
// %typemap(in) string & (std::string temp) {
|
||||
// %typemap(in) string & ($*1_ltype temp) {
|
||||
// if (caml_ptr_check($input)) {
|
||||
// temp.assign((char *)caml_ptr_val($input,0),
|
||||
// caml_string_len($input));
|
||||
|
|
@ -141,9 +141,9 @@ namespace std {
|
|||
// }
|
||||
// }
|
||||
|
||||
// %typemap(in) string * (std::string *temp) {
|
||||
// %typemap(in) string * ($*1_ltype *temp) {
|
||||
// if (caml_ptr_check($input)) {
|
||||
// temp = new std::string((char *)caml_ptr_val($input,0),
|
||||
// temp = new $*1_ltype((char *)caml_ptr_val($input,0),
|
||||
// caml_string_len($input));
|
||||
// $1 = temp;
|
||||
// } else {
|
||||
|
|
@ -151,7 +151,7 @@ namespace std {
|
|||
// }
|
||||
// }
|
||||
|
||||
// %typemap(free) string * (std::string *temp) {
|
||||
// %typemap(free) string * ($*1_ltype *temp) {
|
||||
// delete temp;
|
||||
// }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue