Bug 3324753: fix %rename for member variables under -builtin
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a9bf7737c1
commit
0df6937fbf
1 changed files with 10 additions and 4 deletions
|
|
@ -2650,20 +2650,26 @@ public:
|
||||||
|
|
||||||
/* If this is a builtin type, create a PyGetSetDef entry for this member variable. */
|
/* If this is a builtin type, create a PyGetSetDef entry for this member variable. */
|
||||||
if (builtin_getter) {
|
if (builtin_getter) {
|
||||||
Hash *h = Getattr(builtin_getset, name);
|
String *memname = Getattr(n, "membervariableHandler:sym:name");
|
||||||
|
if (!memname)
|
||||||
|
memname = iname;
|
||||||
|
Hash *h = Getattr(builtin_getset, memname);
|
||||||
if (!h) {
|
if (!h) {
|
||||||
h = NewHash();
|
h = NewHash();
|
||||||
Setattr(builtin_getset, name, h);
|
Setattr(builtin_getset, memname, h);
|
||||||
Delete(h);
|
Delete(h);
|
||||||
}
|
}
|
||||||
Setattr(h, "getter", wrapper_name);
|
Setattr(h, "getter", wrapper_name);
|
||||||
Delattr(n, "memberget");
|
Delattr(n, "memberget");
|
||||||
}
|
}
|
||||||
if (builtin_setter) {
|
if (builtin_setter) {
|
||||||
Hash *h = Getattr(builtin_getset, name);
|
String *memname = Getattr(n, "membervariableHandler:sym:name");
|
||||||
|
if (!memname)
|
||||||
|
memname = iname;
|
||||||
|
Hash *h = Getattr(builtin_getset, memname);
|
||||||
if (!h) {
|
if (!h) {
|
||||||
h = NewHash();
|
h = NewHash();
|
||||||
Setattr(builtin_getset, name, h);
|
Setattr(builtin_getset, memname, h);
|
||||||
Delete(h);
|
Delete(h);
|
||||||
}
|
}
|
||||||
Setattr(h, "setter", wrapper_name);
|
Setattr(h, "setter", wrapper_name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue