Fix bug with return value of getNamespacedName()
We need to make a copy instead of directly returning whatever sym::name points to, as this value can be overwritten with something different later, resulting in weird problems with the value of "proxyname" attribute changing "on its own". After this bug fix, a few more unit tests pass.
This commit is contained in:
parent
fb0579a0df
commit
cb3d9df000
2 changed files with 2 additions and 8 deletions
|
|
@ -158,12 +158,11 @@ public:
|
|||
// FIXME: using namespace as class name is a hack.
|
||||
proxyname = Swig_name_member(NULL, nspace, symname);
|
||||
} else {
|
||||
proxyname = symname;
|
||||
proxyname = Copy(symname);
|
||||
}
|
||||
Setattr(n, "proxyname", proxyname);
|
||||
Delete(proxyname);
|
||||
|
||||
return Copy(proxyname);
|
||||
return proxyname;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue