summaryrefslogtreecommitdiff
path: root/Lib/java/std_string.i
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2012-05-26 06:33:49 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2012-05-26 06:33:49 +0000
commit12a9671440e9408a07d59a8936e75da096fea5fc (patch)
treea22151e261e62ee2aceb6b0f034ba7a424ef4b25 /Lib/java/std_string.i
parent49b6c39d98967c5bad997bf1490deab0161b18a5 (diff)
downloadswig-12a9671440e9408a07d59a8936e75da096fea5fc.tar.gz
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
Diffstat (limited to 'Lib/java/std_string.i')
-rw-r--r--Lib/java/std_string.i12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/java/std_string.i b/Lib/java/std_string.i
index f0d837696..f178e6d43 100644
--- a/Lib/java/std_string.i
+++ b/Lib/java/std_string.i
@@ -28,7 +28,7 @@ class string;
%typemap(in) string
%{ if(!$input) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return $null;
}
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
@@ -38,7 +38,7 @@ class string;
%typemap(directorout) string
%{ if(!$input) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return $null;
}
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
@@ -73,24 +73,24 @@ class string;
%typemap(in) const string &
%{ if(!$input) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return $null;
}
const char *$1_pstr = (const char *)jenv->GetStringUTFChars($input, 0);
if (!$1_pstr) return $null;
- std::string $1_str($1_pstr);
+ $*1_ltype $1_str($1_pstr);
$1 = &$1_str;
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const string &
%{ if(!$input) {
- SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
+ SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null string");
return $null;
}
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;
+ static $*1_ltype $1_str;
$1_str = $1_pstr;
$result = &$1_str;
jenv->ReleaseStringUTFChars($input, $1_pstr); %}