swig/Examples/test-suite/python/inplaceadd.i
Marcelo Matus 1f3d73a0b0 add inplace test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 21:56:14 +00:00

31 lines
336 B
OpenEdge ABL

%module inplaceadd
%inline %{
struct A
{
int val;
A(int v): val(v)
{
}
A& operator+=(int v)
{
val += v;
return *this;
}
A& operator-=(int v)
{
val -= v;
return *this;
}
A& operator*=(int v)
{
val *= v;
return *this;
}
};
%}