fix bug #1174705
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
bad43e0963
commit
e7bd6be39e
2 changed files with 26 additions and 2 deletions
|
|
@ -9,7 +9,8 @@ try:
|
|||
a = Test_int.LeftIndex
|
||||
a = Test_int.cavity_flags
|
||||
except:
|
||||
print "Failed!!"
|
||||
|
||||
raise RuntimeError
|
||||
|
||||
|
||||
if Foo.BAZ.val != 2*Foo.BAR.val:
|
||||
raise RuntimeError
|
||||
|
|
|
|||
|
|
@ -51,3 +51,26 @@ const int &oss::modules::CavityPackFlags::reftest = refvalue;
|
|||
|
||||
%template(Test_int) oss::modules::Test<int>;
|
||||
|
||||
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
class Foo
|
||||
{
|
||||
public:
|
||||
int val;
|
||||
|
||||
Foo(int v) : val(v)
|
||||
{
|
||||
}
|
||||
|
||||
static const Foo BAR;
|
||||
static const Foo BAZ;
|
||||
};
|
||||
|
||||
%}
|
||||
%{
|
||||
const Foo Foo::BAR = Foo(1);
|
||||
const Foo Foo::BAZ = Foo(2);
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue