Fix so that all the const primitive reference types can be applied to other types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7843 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
239e58e462
commit
1986fcd8e0
2 changed files with 46 additions and 46 deletions
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue