git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
31 lines
336 B
OpenEdge ABL
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;
|
|
}
|
|
};
|
|
%}
|