From c6f9abd8f4bb0f046d642a4e27b347324fb7168f Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Fri, 9 Apr 2004 21:59:38 +0000 Subject: [PATCH] use inplace += git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5860 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/python/std_basic_string.i | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Lib/python/std_basic_string.i b/Lib/python/std_basic_string.i index 56223ed28..901b382c7 100644 --- a/Lib/python/std_basic_string.i +++ b/Lib/python/std_basic_string.i @@ -217,18 +217,11 @@ namespace std { replace(iterator __i1, iterator __i2, const_iterator __k1, const_iterator __k2); #endif + std::basic_string<_CharT>& operator +=(const basic_string& v); - %newobject __iadd__; %newobject __add__; %newobject __radd__; %extend { - /* - swig workaround. if used as expected, __iadd__ deletes 'self'. - */ - std::basic_string<_CharT>* __iadd__(const basic_string& v) { - *self += v; - return new std::basic_string<_CharT>(*self); - } std::basic_string<_CharT>* __add__(const basic_string& v) { std::basic_string<_CharT>* res = new std::basic_string<_CharT>(*self);