directorout const string& fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9521 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5346a15881
commit
cb6ebd6f18
2 changed files with 4 additions and 2 deletions
|
|
@ -96,7 +96,8 @@ class string;
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
/* possible thread/reentrant code problem */
|
/* possible thread/reentrant code problem */
|
||||||
static std::string $1_str($input);
|
static std::string $1_str;
|
||||||
|
$1_str = $input;
|
||||||
$result = &$1_str; %}
|
$result = &$1_str; %}
|
||||||
|
|
||||||
%typemap(directorin) const string & %{ $input = SWIG_csharp_string_callback($1.c_str()); %}
|
%typemap(directorin) const string & %{ $input = SWIG_csharp_string_callback($1.c_str()); %}
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,8 @@ class string;
|
||||||
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
|
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
|
||||||
if (!$1_pstr) return $null;
|
if (!$1_pstr) return $null;
|
||||||
/* possible thread/reentrant code problem */
|
/* possible thread/reentrant code problem */
|
||||||
static std::string $1_str($1_pstr);
|
static std::string $1_str;
|
||||||
|
$1_str = $1_pstr;
|
||||||
$result = &$1_str;
|
$result = &$1_str;
|
||||||
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue