cosmetic changes removing unnecessary brackets and empty lines in generated code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8251 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
63c757ba94
commit
36b1e5c2ac
11 changed files with 150 additions and 174 deletions
|
|
@ -147,7 +147,7 @@
|
||||||
const float & ($*1_ltype temp),
|
const float & ($*1_ltype temp),
|
||||||
const double & ($*1_ltype temp)
|
const double & ($*1_ltype temp)
|
||||||
%{ temp = ($*1_ltype)$input;
|
%{ temp = ($*1_ltype)$input;
|
||||||
$1 = &temp; %}
|
$1 = &temp; %}
|
||||||
|
|
||||||
%typemap(out) const bool & %{ $result = *$1; %}
|
%typemap(out) const bool & %{ $result = *$1; %}
|
||||||
%typemap(out) const char & %{ $result = *$1; %}
|
%typemap(out) const char & %{ $result = *$1; %}
|
||||||
|
|
@ -174,7 +174,7 @@ $1 = &temp; %}
|
||||||
$1 = *argp; %}
|
$1 = *argp; %}
|
||||||
%typemap(out) SWIGTYPE
|
%typemap(out) SWIGTYPE
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
%{$result = new $1_ltype(($1_ltype &)$1); %}
|
%{ $result = new $1_ltype(($1_ltype &)$1); %}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
$&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
|
$&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
|
||||||
|
|
@ -292,23 +292,20 @@ $1 = &temp; %}
|
||||||
short,
|
short,
|
||||||
unsigned int,
|
unsigned int,
|
||||||
unsigned long,
|
unsigned long,
|
||||||
unsigned short {
|
unsigned short
|
||||||
char error_msg[256];
|
%{ char error_msg[256];
|
||||||
sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
|
sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, error_msg);
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, error_msg);
|
||||||
return $null;
|
return $null; %}
|
||||||
}
|
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [ANY] %{
|
%typemap(throws, canthrow=1) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [ANY]
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) char * %{
|
%typemap(throws, canthrow=1) char *
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1);
|
%{ SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1);
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
|
|
||||||
/* Typemaps for code generation in proxy classes and C# type wrapper classes */
|
/* Typemaps for code generation in proxy classes and C# type wrapper classes */
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) const enum SWIGTYPE & %{
|
%typemap(throws, canthrow=1) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) const enum SWIGTYPE & "(int)$csinput"
|
%typemap(csin) const enum SWIGTYPE & "(int)$csinput"
|
||||||
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
||||||
|
|
@ -44,11 +43,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) enum SWIGTYPE %{
|
%typemap(throws, canthrow=1) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) enum SWIGTYPE "(int)$csinput"
|
%typemap(csin) enum SWIGTYPE "(int)$csinput"
|
||||||
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) const enum SWIGTYPE & %{
|
%typemap(throws, canthrow=1) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) const enum SWIGTYPE & "$csinput"
|
%typemap(csin) const enum SWIGTYPE & "$csinput"
|
||||||
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
||||||
|
|
@ -46,11 +45,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) enum SWIGTYPE %{
|
%typemap(throws, canthrow=1) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) enum SWIGTYPE "$csinput"
|
%typemap(csin) enum SWIGTYPE "$csinput"
|
||||||
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) const enum SWIGTYPE & %{
|
%typemap(throws, canthrow=1) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) const enum SWIGTYPE & "$csinput.swigValue"
|
%typemap(csin) const enum SWIGTYPE & "$csinput.swigValue"
|
||||||
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
%typemap(csout, excode=SWIGEXCODE) const enum SWIGTYPE & {
|
||||||
|
|
@ -45,11 +44,10 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) enum SWIGTYPE %{
|
%typemap(throws, canthrow=1) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(csin) enum SWIGTYPE "$csinput.swigValue"
|
%typemap(csin) enum SWIGTYPE "$csinput.swigValue"
|
||||||
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
%typemap(csout, excode=SWIGEXCODE) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,9 @@ class string;
|
||||||
|
|
||||||
%typemap(typecheck) string = char *;
|
%typemap(typecheck) string = char *;
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) string %{
|
%typemap(throws, canthrow=1) string
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());
|
%{ SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
// const string &
|
// const string &
|
||||||
%typemap(ctype) const string & "char *"
|
%typemap(ctype) const string & "char *"
|
||||||
|
|
@ -89,10 +88,9 @@ class string;
|
||||||
|
|
||||||
%typemap(typecheck) const string & = char *;
|
%typemap(typecheck) const string & = char *;
|
||||||
|
|
||||||
%typemap(throws, canthrow=1) const string & %{
|
%typemap(throws, canthrow=1) const string &
|
||||||
SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());
|
%{ SWIG_CSharpSetPendingException(SWIG_CSharpApplicationException, $1.c_str());
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws) const enum SWIGTYPE & %{
|
%typemap(throws) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) const enum SWIGTYPE & "$javainput.swigValue()"
|
%typemap(javain) const enum SWIGTYPE & "$javainput.swigValue()"
|
||||||
%typemap(javaout) const enum SWIGTYPE & {
|
%typemap(javaout) const enum SWIGTYPE & {
|
||||||
|
|
@ -50,10 +49,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws) enum SWIGTYPE %{
|
%typemap(throws) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) enum SWIGTYPE "$javainput.swigValue()"
|
%typemap(javain) enum SWIGTYPE "$javainput.swigValue()"
|
||||||
%typemap(javaout) enum SWIGTYPE {
|
%typemap(javaout) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws) const enum SWIGTYPE & %{
|
%typemap(throws) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) const enum SWIGTYPE & "$javainput"
|
%typemap(javain) const enum SWIGTYPE & "$javainput"
|
||||||
%typemap(javaout) const enum SWIGTYPE & {
|
%typemap(javaout) const enum SWIGTYPE & {
|
||||||
|
|
@ -50,10 +49,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws) enum SWIGTYPE %{
|
%typemap(throws) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) enum SWIGTYPE "$javainput"
|
%typemap(javain) enum SWIGTYPE "$javainput"
|
||||||
%typemap(javaout) enum SWIGTYPE {
|
%typemap(javaout) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_POINTER) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws) const enum SWIGTYPE & %{
|
%typemap(throws) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) const enum SWIGTYPE & "$javainput.swigValue()"
|
%typemap(javain) const enum SWIGTYPE & "$javainput.swigValue()"
|
||||||
%typemap(javaout) const enum SWIGTYPE & {
|
%typemap(javaout) const enum SWIGTYPE & {
|
||||||
|
|
@ -48,10 +47,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_POINTER) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws) enum SWIGTYPE %{
|
%typemap(throws) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) enum SWIGTYPE "$javainput.swigValue()"
|
%typemap(javain) enum SWIGTYPE "$javainput.swigValue()"
|
||||||
%typemap(javaout) enum SWIGTYPE {
|
%typemap(javaout) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
%typecheck(SWIG_TYPECHECK_INT32) const enum SWIGTYPE & ""
|
||||||
|
|
||||||
%typemap(throws) const enum SWIGTYPE & %{
|
%typemap(throws) const enum SWIGTYPE &
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) const enum SWIGTYPE & "$javainput"
|
%typemap(javain) const enum SWIGTYPE & "$javainput"
|
||||||
%typemap(javaout) const enum SWIGTYPE & {
|
%typemap(javaout) const enum SWIGTYPE & {
|
||||||
|
|
@ -50,10 +49,9 @@
|
||||||
|
|
||||||
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
%typecheck(SWIG_TYPECHECK_INT32) enum SWIGTYPE ""
|
||||||
|
|
||||||
%typemap(throws) enum SWIGTYPE %{
|
%typemap(throws) enum SWIGTYPE
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown"); %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(javain) enum SWIGTYPE "$javainput"
|
%typemap(javain) enum SWIGTYPE "$javainput"
|
||||||
%typemap(javaout) enum SWIGTYPE {
|
%typemap(javaout) enum SWIGTYPE {
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@
|
||||||
%typemap(javadirectorout) unsigned long long "$javacall"
|
%typemap(javadirectorout) unsigned long long "$javacall"
|
||||||
|
|
||||||
/* char * - treat as String */
|
/* char * - treat as String */
|
||||||
%typemap(in) char * {
|
%typemap(in, noblock=1) char * {
|
||||||
$1 = 0;
|
$1 = 0;
|
||||||
if ($input) {
|
if ($input) {
|
||||||
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
||||||
|
|
@ -359,7 +359,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(directorout) char * {
|
%typemap(directorout, noblock=1) char * {
|
||||||
$1 = 0;
|
$1 = 0;
|
||||||
if ($input) {
|
if ($input) {
|
||||||
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
||||||
|
|
@ -367,7 +367,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(directorin, descriptor="Ljava/lang/String;") char * {
|
%typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char * {
|
||||||
$input = 0;
|
$input = 0;
|
||||||
if ($1) {
|
if ($1) {
|
||||||
$input = JCALL1(NewStringUTF, jenv, $1);
|
$input = JCALL1(NewStringUTF, jenv, $1);
|
||||||
|
|
@ -375,8 +375,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(freearg) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
%typemap(freearg, noblock=1) char * { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
||||||
%typemap(out) char * { if($1) $result = JCALL1(NewStringUTF, jenv, $1); }
|
%typemap(out, noblock=1) char * { if($1) $result = JCALL1(NewStringUTF, jenv, $1); }
|
||||||
%typemap(javadirectorin) char * "$jniinput"
|
%typemap(javadirectorin) char * "$jniinput"
|
||||||
%typemap(javadirectorout) char * "$javacall"
|
%typemap(javadirectorout) char * "$javacall"
|
||||||
|
|
||||||
|
|
@ -593,7 +593,7 @@
|
||||||
|
|
||||||
%typemap(out) SWIGTYPE
|
%typemap(out) SWIGTYPE
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
%{*($&1_ltype*)(void *)&$result = new $1_ltype(($1_ltype &)$1); %}
|
%{ *($&1_ltype*)(void *)&$result = new $1_ltype(($1_ltype &)$1); %}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
$&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
|
$&1_ltype $1ptr = ($&1_ltype) malloc(sizeof($1_ltype));
|
||||||
|
|
@ -637,7 +637,7 @@
|
||||||
%typemap(freearg) SWIGTYPE [ANY], SWIGTYPE [] ""
|
%typemap(freearg) SWIGTYPE [ANY], SWIGTYPE [] ""
|
||||||
|
|
||||||
/* char arrays - treat as String */
|
/* char arrays - treat as String */
|
||||||
%typemap(in) char[ANY], char[] {
|
%typemap(in, noblock=1) char[ANY], char[] {
|
||||||
$1 = 0;
|
$1 = 0;
|
||||||
if ($input) {
|
if ($input) {
|
||||||
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
||||||
|
|
@ -645,7 +645,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(directorout) char[ANY], char[] {
|
%typemap(directorout, noblock=1) char[ANY], char[] {
|
||||||
$1 = 0;
|
$1 = 0;
|
||||||
if ($input) {
|
if ($input) {
|
||||||
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
$1 = ($1_ltype)JCALL2(GetStringUTFChars, jenv, $input, 0);
|
||||||
|
|
@ -653,7 +653,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(directorin, descriptor="Ljava/lang/String;") char[ANY], char[] {
|
%typemap(directorin, descriptor="Ljava/lang/String;", noblock=1) char[ANY], char[] {
|
||||||
$input = 0;
|
$input = 0;
|
||||||
if ($1) {
|
if ($1) {
|
||||||
$input = JCALL1(NewStringUTF, jenv, $1);
|
$input = JCALL1(NewStringUTF, jenv, $1);
|
||||||
|
|
@ -662,8 +662,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(argout) char[ANY], char[] ""
|
%typemap(argout) char[ANY], char[] ""
|
||||||
%typemap(freearg) char[ANY], char[] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
%typemap(freearg, noblock=1) char[ANY], char[] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
||||||
%typemap(out) char[ANY], char[] { if($1) $result = JCALL1(NewStringUTF, jenv, $1); }
|
%typemap(out, noblock=1) char[ANY], char[] { if($1) $result = JCALL1(NewStringUTF, jenv, $1); }
|
||||||
%typemap(javadirectorin) char[ANY], char[] "$jniinput"
|
%typemap(javadirectorin) char[ANY], char[] "$jniinput"
|
||||||
%typemap(javadirectorout) char[ANY], char[] "$javacall"
|
%typemap(javadirectorout) char[ANY], char[] "$javacall"
|
||||||
|
|
||||||
|
|
@ -918,23 +918,20 @@
|
||||||
short,
|
short,
|
||||||
unsigned int,
|
unsigned int,
|
||||||
unsigned long,
|
unsigned long,
|
||||||
unsigned short {
|
unsigned short
|
||||||
char error_msg[256];
|
%{ char error_msg[256];
|
||||||
sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
|
sprintf(error_msg, "C++ $1_type exception thrown, value: %d", $1);
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, error_msg);
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, error_msg);
|
||||||
return $null;
|
return $null; %}
|
||||||
}
|
|
||||||
|
|
||||||
%typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY] %{
|
%typemap(throws) SWIGTYPE, SWIGTYPE &, SWIGTYPE *, SWIGTYPE [], SWIGTYPE [ANY]
|
||||||
(void)$1;
|
%{ (void)$1;
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, "C++ $1_type exception thrown");
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
%typemap(throws) char * %{
|
%typemap(throws) char *
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1);
|
%{ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1);
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
|
|
||||||
/* Typemaps for code generation in proxy classes and Java type wrapper classes */
|
/* Typemaps for code generation in proxy classes and Java type wrapper classes */
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class string;
|
||||||
%typemap(javadirectorout) string "$javacall"
|
%typemap(javadirectorout) string "$javacall"
|
||||||
|
|
||||||
%typemap(in) string
|
%typemap(in) string
|
||||||
%{if(!$input) {
|
%{ if(!$input) {
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
@ -40,7 +40,7 @@ class string;
|
||||||
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
||||||
|
|
||||||
%typemap(directorout) string
|
%typemap(directorout) string
|
||||||
%{if(!$input) {
|
%{ if(!$input) {
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
@ -63,10 +63,9 @@ class string;
|
||||||
|
|
||||||
%typemap(typecheck) string = char *;
|
%typemap(typecheck) string = char *;
|
||||||
|
|
||||||
%typemap(throws) string %{
|
%typemap(throws) string
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
%{ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
// const string &
|
// const string &
|
||||||
%typemap(jni) const string & "jstring"
|
%typemap(jni) const string & "jstring"
|
||||||
|
|
@ -76,7 +75,7 @@ class string;
|
||||||
%typemap(javadirectorout) const string & "$javacall"
|
%typemap(javadirectorout) const string & "$javacall"
|
||||||
|
|
||||||
%typemap(in) const string &
|
%typemap(in) const string &
|
||||||
%{if(!$input) {
|
%{ if(!$input) {
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
@ -87,7 +86,7 @@ class string;
|
||||||
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
jenv->ReleaseStringUTFChars($input, $1_pstr); %}
|
||||||
|
|
||||||
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const string &
|
%typemap(directorout,warning=SWIGWARN_TYPEMAP_THREAD_UNSAFE_MSG) const string &
|
||||||
%{if(!$input) {
|
%{ if(!$input) {
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null std::string");
|
||||||
return $null;
|
return $null;
|
||||||
}
|
}
|
||||||
|
|
@ -112,10 +111,9 @@ class string;
|
||||||
|
|
||||||
%typemap(typecheck) const string & = char *;
|
%typemap(typecheck) const string & = char *;
|
||||||
|
|
||||||
%typemap(throws) const string & %{
|
%typemap(throws) const string &
|
||||||
SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
%{ SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException, $1.c_str());
|
||||||
return $null;
|
return $null; %}
|
||||||
%}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue