diff --git a/Lib/csharp/csharp.swg b/Lib/csharp/csharp.swg index 67e77bce0..d688afa60 100644 --- a/Lib/csharp/csharp.swg +++ b/Lib/csharp/csharp.swg @@ -129,23 +129,23 @@ %typemap(out, null="") void "" /* primitive types by const reference */ -%typemap(in) const bool & (bool temp) +%typemap(in) const bool & ($*1_ltype temp) %{ temp = $input ? true : false; $1 = &temp; %} -%typemap(in) const char & (char temp), - const signed char & (signed char temp), - const unsigned char & (unsigned char temp), - const short & (short temp), - const unsigned short & (unsigned short temp), - const int & (int temp), - const unsigned int & (unsigned int temp), - const long & (long temp), - const unsigned long & (unsigned long temp), +%typemap(in) const char & ($*1_ltype temp), + const signed char & ($*1_ltype temp), + const unsigned char & ($*1_ltype temp), + const short & ($*1_ltype temp), + const unsigned short & ($*1_ltype temp), + const int & ($*1_ltype temp), + const unsigned int & ($*1_ltype temp), + const long & ($*1_ltype temp), + const unsigned long & ($*1_ltype temp), const long long & ($*1_ltype temp), const unsigned long long & ($*1_ltype temp), - const float & (float temp), - const double & (double temp) + const float & ($*1_ltype temp), + const double & ($*1_ltype temp) %{ temp = ($*1_ltype)$input; $1 = &temp; %} diff --git a/Lib/java/java.swg b/Lib/java/java.swg index 471dd2892..70ca33460 100644 --- a/Lib/java/java.swg +++ b/Lib/java/java.swg @@ -386,7 +386,7 @@ %typemap(directorin, descriptor="V") void "" /* primitive types by reference */ -%typemap(in) const bool & (bool temp) +%typemap(in) const bool & ($*1_ltype temp) %{ temp = $input ? true : false; $1 = &temp; %} @@ -398,18 +398,18 @@ %typemap(javadirectorin) const bool & "$jniinput" %typemap(javadirectorout) const bool & "$javacall" -%typemap(in) const char & (char temp), - const signed char & (signed char temp), - const unsigned char & (unsigned char temp), - const short & (short temp), - const unsigned short & (unsigned short temp), - const int & (int temp), - const unsigned int & (unsigned int temp), - const long & (long temp), - const unsigned long & (unsigned long temp), +%typemap(in) const char & ($*1_ltype temp), + const signed char & ($*1_ltype temp), + const unsigned char & ($*1_ltype temp), + const short & ($*1_ltype temp), + const unsigned short & ($*1_ltype temp), + const int & ($*1_ltype temp), + const unsigned int & ($*1_ltype temp), + const long & ($*1_ltype temp), + const unsigned long & ($*1_ltype temp), const long long & ($*1_ltype temp), - const float & (float temp), - const double & (double temp) + const float & ($*1_ltype temp), + const double & ($*1_ltype temp) %{ temp = ($*1_ltype)$input; $1 = &temp; %} @@ -443,32 +443,32 @@ %typemap(directorin, descriptor="F") const float & "$input = (jfloat)$1_name;" %typemap(directorin, descriptor="D") const double & "$input = (jdouble)$1_name;" -%typemap(javadirectorin) const char & (char temp), - const signed char & (signed char temp), - const unsigned char & (unsigned char temp), - const short & (short temp), - const unsigned short & (unsigned short temp), - const int & (int temp), - const unsigned int & (unsigned int temp), - const long & (long temp), - const unsigned long & (unsigned long temp), +%typemap(javadirectorin) const char & ($*1_ltype temp), + const signed char & ($*1_ltype temp), + const unsigned char & ($*1_ltype temp), + const short & ($*1_ltype temp), + const unsigned short & ($*1_ltype temp), + const int & ($*1_ltype temp), + const unsigned int & ($*1_ltype temp), + const long & ($*1_ltype temp), + const unsigned long & ($*1_ltype temp), const long long & ($*1_ltype temp), - const float & (float temp), - const double & (double temp) + const float & ($*1_ltype temp), + const double & ($*1_ltype temp) "$jniinput" -%typemap(javadirectorout) const char & (char temp), - const signed char & (signed char temp), - const unsigned char & (unsigned char temp), - const short & (short temp), - const unsigned short & (unsigned short temp), - const int & (int temp), - const unsigned int & (unsigned int temp), - const long & (long temp), - const unsigned long & (unsigned long temp), +%typemap(javadirectorout) const char & ($*1_ltype temp), + const signed char & ($*1_ltype temp), + const unsigned char & ($*1_ltype temp), + const short & ($*1_ltype temp), + const unsigned short & ($*1_ltype temp), + const int & ($*1_ltype temp), + const unsigned int & ($*1_ltype temp), + const long & ($*1_ltype temp), + const unsigned long & ($*1_ltype temp), const long long & ($*1_ltype temp), - const float & (float temp), - const double & (double temp) + const float & ($*1_ltype temp), + const double & ($*1_ltype temp) "$javacall"