Marcelo's patch which fixes virtual:type attribute always being set.
Removes incorrect warnings about covariant return types in Java and C#. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5597 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ac011192ae
commit
bda422a29c
1 changed files with 17 additions and 13 deletions
|
|
@ -99,19 +99,23 @@ class Allocate : public Dispatcher {
|
||||||
(!Strcmp(local_type, base_type)
|
(!Strcmp(local_type, base_type)
|
||||||
|| SwigType_issubtype(local_type, base_type)) &&
|
|| SwigType_issubtype(local_type, base_type)) &&
|
||||||
(!Strcmp(local_decl, base_decl)) ) {
|
(!Strcmp(local_decl, base_decl)) ) {
|
||||||
// Indicate a virtual method in the derived class, that is, not the virtual method definition in a base class
|
// Indicate a virtual method in the derived class, that
|
||||||
Setattr(c, "storage", "virtual");
|
// is, not the virtual method definition in a base class
|
||||||
Setattr(c, "virtual:derived", "1");
|
Setattr(c, "storage", "virtual");
|
||||||
// record the virtual base type in case some language needs it
|
Setattr(c, "virtual:derived", "1");
|
||||||
Setattr(c, "virtual:type", Getattr(temp, "type"));
|
// record the virtual base type in case some language
|
||||||
if (virtual_elimination_mode && !Strcmp(local_type, base_type))
|
// needs it
|
||||||
Setattr(c, "feature:ignore", "1");
|
if (Strcmp(local_type, base_type) == 0) {
|
||||||
|
if (virtual_elimination_mode) Setattr(c,"feature:ignore", "1");
|
||||||
Delete(base_decl);
|
} else {
|
||||||
Delete(base_type);
|
Setattr(c, "virtual:type", Getattr(temp, "type"));
|
||||||
Delete(local_decl);
|
}
|
||||||
Delete(local_type);
|
|
||||||
return 1;
|
Delete(base_decl);
|
||||||
|
Delete(base_type);
|
||||||
|
Delete(local_decl);
|
||||||
|
Delete(local_type);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
Delete(base_decl);
|
Delete(base_decl);
|
||||||
Delete(base_type);
|
Delete(base_type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue