Correct checked exceptions specified in the throws typemap for javadirectorin and javadirectorout typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
20954f9bdc
commit
b18861a374
1 changed files with 9 additions and 0 deletions
|
|
@ -11,6 +11,14 @@
|
|||
%feature("director") Base;
|
||||
%feature("director") Derived;
|
||||
|
||||
// Test the throws attribute in these typemaps
|
||||
%typemap(javadirectorout, throws="RuntimeException/*javadirectorout Base&*/") Base&
|
||||
"$javaclassname.getCPtr($javacall)/* XYZ& typemap directorout*/"
|
||||
%typemap(javadirectorin, throws="Throwable/*javadirectorin Base&*/") Base&
|
||||
"new $javaclassname($jniinput, false)/*javadirectorin*/"
|
||||
%typemap(out, throws="IllegalAccessException/*out Base&*/") Base& {
|
||||
// XYZ& typemap out
|
||||
}
|
||||
%inline %{
|
||||
|
||||
template<class T> T maximum(const T a, const T b) { return a>b ? a : b; }
|
||||
|
|
@ -42,6 +50,7 @@ public:
|
|||
Base(Base *b) : mVectInt(0) {}
|
||||
virtual ~Base() {}
|
||||
virtual Base& m1(Base &b) { return b; }
|
||||
virtual Base& m1out() { static Base b; return b; }
|
||||
virtual Base* m2(Base *b) { return b; }
|
||||
// virtual Base m3(Base b) { return b; }
|
||||
vector<int> mVectInt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue