Complete the virtual:type for covariant return types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6797 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9316c04deb
commit
bf7eb7d50d
1 changed files with 10 additions and 3 deletions
|
|
@ -114,9 +114,16 @@ class Allocate : public Dispatcher {
|
|||
if (strcmp(la, ba) == 0) Setattr(c,"feature:ignore", "1");
|
||||
}
|
||||
} else {
|
||||
// if the types are different, we record the original
|
||||
// virtual base type in case some language needs it.
|
||||
Setattr(c, "virtual:type", Getattr(temp, "type"));
|
||||
// if the types are different, we record the base type
|
||||
// those languages that need to know about covariant return types
|
||||
SwigType *ty = NewString(Getattr(temp,"type"));
|
||||
SwigType_push(ty,Getattr(temp,"decl"));
|
||||
if (SwigType_isqualifier(ty)) {
|
||||
SwigType_pop(ty);
|
||||
}
|
||||
Delete(SwigType_pop_function(ty));
|
||||
|
||||
Setattr(c, "virtual:type", ty);
|
||||
}
|
||||
|
||||
Delete(base_decl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue