Change typemap matching rules for the default type (SWIGTYPE) to follow template partial specialization type deduction. Fixes some containers of const pointers. SWIGTYPE*& typemps removed and replaced with SWIGTYPE *const&.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-04-01 18:26:37 +00:00
commit bdb136d611
41 changed files with 477 additions and 122 deletions

View file

@ -897,6 +897,7 @@
SWIGTYPE,
SWIGTYPE *,
SWIGTYPE &,
SWIGTYPE *const&,
SWIGTYPE [],
SWIGTYPE (CLASS::*)
""
@ -1025,23 +1026,20 @@
}
/* Pointer reference typemaps */
%typemap(jni) SWIGTYPE *& "jlong"
%typemap(jtype) SWIGTYPE *& "long"
%typemap(jstype) SWIGTYPE *& "$*javaclassname"
%typemap(javain) SWIGTYPE *& "$*javaclassname.getCPtr($javainput)"
%typemap(javaout) SWIGTYPE *& {
%typemap(jni) SWIGTYPE *const& "jlong"
%typemap(jtype) SWIGTYPE *const& "long"
%typemap(jstype) SWIGTYPE *const& "$*javaclassname"
%typemap(javain) SWIGTYPE *const& "$*javaclassname.getCPtr($javainput)"
%typemap(javaout) SWIGTYPE *const& {
long cPtr = $jnicall;
return (cPtr == 0) ? null : new $*javaclassname(cPtr, $owner);
}
%typemap(in) SWIGTYPE *& ($*1_ltype temp = 0)
%typemap(in) SWIGTYPE *const& ($*1_ltype temp = 0)
%{ temp = *($1_ltype)&$input;
$1 = &temp; %}
%typemap(out) SWIGTYPE *&
$1 = ($1_ltype)&temp; %}
%typemap(out) SWIGTYPE *const&
%{ *($1_ltype)&$result = *$1; %}
/* Array reference typemaps */
%apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }
/* Typemaps used for the generation of proxy and type wrapper class code */
%typemap(javabase) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) ""
%typemap(javaclassmodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [], SWIGTYPE (CLASS::*) "public class"
@ -1203,6 +1201,12 @@ SWIG_PROXY_CONSTRUCTOR(true, true, SWIGTYPE)
%apply unsigned long { size_t };
%apply const unsigned long & { const size_t & };
/* Array reference typemaps */
%apply SWIGTYPE & { SWIGTYPE ((&)[ANY]) }
/* const pointers */
%apply SWIGTYPE * { SWIGTYPE *const }
/* java keywords */
%include <javakw.swg>