Merge branch 'amaeldoe-master'

* amaeldoe-master:
  Add python runtime test for dynamically added attributes
  Attribute of SWIG wrapped classes instances were overwritten on __init__()
  Fix SwigPyObject->dict memory leak
  Make __dict__ accessible for Python builtin classes
This commit is contained in:
William S Fulton 2015-04-11 12:37:11 +01:00
commit b886a54fce
4 changed files with 56 additions and 3 deletions

View file

@ -3058,6 +3058,17 @@ public:
}
/* If this is a builtin type, create a PyGetSetDef entry for this member variable. */
if (builtin) {
const char *memname = "__dict__";
Hash *h = Getattr(builtin_getset, memname);
if (!h) {
h = NewHash();
Setattr(builtin_getset, memname, h);
Delete(h);
}
Setattr(h, "getter", "SwigPyObject_get___dict__");
}
if (builtin_getter) {
String *memname = Getattr(n, "membervariableHandler:sym:name");
if (!memname)