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:
William S Fulton 2012-05-26 06:33:49 +00:00
commit 12a9671440
13 changed files with 37 additions and 33 deletions

View file

@ -36,7 +36,7 @@ class string;
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "null string");
return $null;
}
std::string $1_str($input);
$*1_ltype $1_str($input);
$1 = &$1_str; %}
%typemap(out) string %{ $result = SWIG_d_string_callback($1.c_str()); %}
@ -63,7 +63,7 @@ class string;
return $null;
}
/* possible thread/reentrant code problem */
static std::string $1_str;
static $*1_ltype $1_str;
$1_str = $input;
$result = &$1_str; %}