Fix typemap matching to expand template parameters when the name contains template parameters.
In the %typemap below the type is T and the name is X<T>::make
which now expands correctly to X< int >::make
template<typename T> struct X {
%typemap(out) T X<T>::make "..."
T make();
};
%template(Xint) X<int>;
This commit is contained in:
parent
024eaeaacf
commit
b9350614b5
5 changed files with 66 additions and 0 deletions
23
Examples/test-suite/java/typemap_template_parms_runme.java
Normal file
23
Examples/test-suite/java/typemap_template_parms_runme.java
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import typemap_template_parms.*;
|
||||
|
||||
public class typemap_template_parms_runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("typemap_template_parms");
|
||||
} catch (UnsatisfiedLinkError e) {
|
||||
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
||||
System.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
Xint xint = new Xint();
|
||||
int i = 0;
|
||||
i = xint.bake();
|
||||
i = xint.make();
|
||||
i = xint.lake();
|
||||
i = xint.rake();
|
||||
i = xint.take();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue