From 7c016db1908e9a01360768c67870fee7875e02c9 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Sun, 28 Aug 2005 07:13:02 +0000 Subject: [PATCH] fix for bug #1245591, related to __class__ attribute in Ptr classes + -nomodern (or exceptions) git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7398 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Modules/python.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SWIG/Source/Modules/python.cxx b/SWIG/Source/Modules/python.cxx index 32153b32a..b7b18de9e 100644 --- a/SWIG/Source/Modules/python.cxx +++ b/SWIG/Source/Modules/python.cxx @@ -2106,8 +2106,7 @@ public: Printv(f_shadow_file, tab8, "_swig_setattr(self, ", class_name, ", 'this', this)\n", tab8, "if not hasattr(self,\"thisown\"): _swig_setattr(self, ", class_name, ", 'thisown', 0)\n", - tab8, "_swig_setattr(self, ", class_name, ",self.__class__,", class_name, ")\n", - NIL); + tab8, "self.__class__ = ", class_name, "\n", NIL); } else { Printv(f_shadow_file, tab8, "self.this = this\n",