wstring directorin typemap fixes from Russell Keith-Magee
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
05def34d9a
commit
310e2f9db3
1 changed files with 2 additions and 2 deletions
|
|
@ -196,10 +196,10 @@ class wstring;
|
|||
jenv->ReleaseStringChars($input, $1_pstr); %}
|
||||
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") const wstring &
|
||||
%{jsize $1_len = $1->length();
|
||||
%{jsize $1_len = $1.length();
|
||||
jchar *conv_buf = new jchar[$1_len];
|
||||
for (jsize i = 0; i < $1_len; ++i) {
|
||||
conv_buf[i] = (jchar)(*$1)[i];
|
||||
conv_buf[i] = (jchar)($1)[i];
|
||||
}
|
||||
$input = jenv->NewString(conv_buf, $1_len);
|
||||
delete [] conv_buf; %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue