diff --git a/SWIG/CHANGES.current b/SWIG/CHANGES.current index 1fae3fb0c..195eab5d9 100644 --- a/SWIG/CHANGES.current +++ b/SWIG/CHANGES.current @@ -1,6 +1,36 @@ Version 1.3.22 (in progress) ================================== +04/10/2004: mmatus (Marcelo Matus) + + [python] Fix the default behaviour (seg. fault) when an + inplace operator (+=,-=,...) was wrapped, as reported by + Lucriz (lucriz@sitilandia.it), when the most common + form was used: + + A& A::operator+=(int i) { ...; return *this; } + ^^^^ ^^^^^^ + + + ie, an object is returned and its contains the same 'this' + value than the input object, which is deleted after the + operation "a += b", leaving the result with no real + object, but a seg. fault. + + To fix it, we needed to introduce a new feature and use an + old one: + + %feature("self:disown","") A::operator+=; + %feature("new","") A::operator+=; + + here, "self:disown" disable the ownership of the 'self' + or input object, and the "new" feature transfers the + ownership to the result object. + + The feature/solution could also be used in other languages + that use gc and implement the inplace operators, or other + operators, in a similar way. + 04/07/2004: cheetah (William Fulton) [C#] C++ enums are no longer wrapped by integers, they are now wrapped by C# enums. For Example, given C++: