implement the 'allowexcept' feature for global variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8585 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
32d28239da
commit
4166e36abb
1 changed files with 13 additions and 0 deletions
|
|
@ -34,7 +34,14 @@
|
|||
%catches(E1,E2*,ET<int>,ET<double>,...) A::barfoo(int i);
|
||||
|
||||
|
||||
%allowexception efoovar;
|
||||
%allowexception A::efoovar;
|
||||
|
||||
%inline %{
|
||||
int efoovar;
|
||||
int foovar;
|
||||
const int cfoovar = 1;
|
||||
|
||||
struct E1
|
||||
{
|
||||
};
|
||||
|
|
@ -54,6 +61,11 @@
|
|||
|
||||
struct A
|
||||
{
|
||||
static int sfoovar;
|
||||
static const int csfoovar = 1;
|
||||
int foovar;
|
||||
int efoovar;
|
||||
|
||||
/* caught by the user's throw definition */
|
||||
int foo() throw(E1)
|
||||
{
|
||||
|
|
@ -90,6 +102,7 @@
|
|||
return 0;
|
||||
}
|
||||
};
|
||||
int A::sfoovar = 1;
|
||||
%}
|
||||
|
||||
%template(ET_i) ET<int>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue