Fixing setting this in Python when using __slots__

Don't attempt to use the class's __dict__ for setting 'this' when
a user has extended a class with:
    __slots__ = ['this'].
Was segfaulting. Now we fall back to a simple PyObject_SetAttr if the
usual approach to setting 'this' in __dict__ does not work.

Closes #1673 Closes #1674
This commit is contained in:
William S Fulton 2020-02-06 06:45:11 +00:00
commit a01e8474f6
4 changed files with 46 additions and 15 deletions

View file

@ -7,6 +7,9 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.0.2 (in progress)
===========================
2020-02-06: wsfulton
[Python] #1673 #1674 Fix setting 'this' when extending a proxy class with __slots__.
2020-01-31: vadz
[Ruby] Add std::auto_ptr<> typemaps.