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:
Marcelo Matus 2006-01-28 03:38:27 +00:00
commit 4166e36abb

View file

@ -34,7 +34,14 @@
%catches(E1,E2*,ET<int>,ET<double>,...) A::barfoo(int i); %catches(E1,E2*,ET<int>,ET<double>,...) A::barfoo(int i);
%allowexception efoovar;
%allowexception A::efoovar;
%inline %{ %inline %{
int efoovar;
int foovar;
const int cfoovar = 1;
struct E1 struct E1
{ {
}; };
@ -54,6 +61,11 @@
struct A struct A
{ {
static int sfoovar;
static const int csfoovar = 1;
int foovar;
int efoovar;
/* caught by the user's throw definition */ /* caught by the user's throw definition */
int foo() throw(E1) int foo() throw(E1)
{ {
@ -90,6 +102,7 @@
return 0; return 0;
} }
}; };
int A::sfoovar = 1;
%} %}
%template(ET_i) ET<int>; %template(ET_i) ET<int>;