directorout const string& fix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9521 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-11-03 21:57:27 +00:00
commit c464743104
2 changed files with 4 additions and 2 deletions

View file

@ -93,7 +93,8 @@ class string;
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
if (!$1_pstr) return $null;
/* possible thread/reentrant code problem */
static std::string $1_str($1_pstr);
static std::string $1_str;
$1_str = $1_pstr;
$result = &$1_str;
jenv->ReleaseStringUTFChars($input, $1_pstr); %}