Now constructors use SWIG_create_object() function, which fills type information for SwigObj struct. 'out' typemaps for objects and 'throws' typemaps also use this.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@10696 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fd77fa609
commit
96a52c763c
3 changed files with 68 additions and 48 deletions
|
|
@ -33,22 +33,9 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Additional typemaps needed to handle exception order in C.
|
||||
*/
|
||||
#if defined(SWIGC)
|
||||
%typemap(throws) SWIGTYPE {
|
||||
SwigObj *_c_ex = _wrap_new_$1_basetype();
|
||||
SWIG_CThrowException(_c_ex, "C++ $1_type exception thrown");
|
||||
}
|
||||
|
||||
%typemap(throws) ET<int>, ET<double> {
|
||||
SWIG_CThrowException(NULL, "C++ $1_type exception thrown");
|
||||
}
|
||||
#endif
|
||||
|
||||
%catches(E1,E2*,ET<int>,ET<double>,...) A::barfoo(int i);
|
||||
|
||||
|
||||
%allowexception efoovar;
|
||||
%allowexception A::efoovar;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue