Fix smart pointer wrappers. The virtual/override/new keyword is not generated for each method as the smart pointer class does not mirror the underlying pointer class inheritance hierarchy. SF #1496535
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b0f01fbc6c
commit
016db92c82
1 changed files with 9 additions and 6 deletions
|
|
@ -1921,12 +1921,15 @@ class CSHARP : public Language {
|
|||
} else {
|
||||
methodmods = (!is_public(n) ? protected_string : public_string);
|
||||
Printf(function_code, " %s ", methodmods);
|
||||
if (Getattr(n,"override"))
|
||||
Printf(function_code, "override ");
|
||||
else if (checkAttribute(n, "storage", "virtual"))
|
||||
Printf(function_code, "virtual ");
|
||||
if (Getattr(n, "hides"))
|
||||
Printf(function_code, "new ");
|
||||
if (!is_smart_pointer()) {
|
||||
// Smart pointer classes do not mirror the inheritance hierarchy of the underlying pointer type, so no virtual/override/new required.
|
||||
if (Getattr(n,"override"))
|
||||
Printf(function_code, "override ");
|
||||
else if (checkAttribute(n, "storage", "virtual"))
|
||||
Printf(function_code, "virtual ");
|
||||
if (Getattr(n, "hides"))
|
||||
Printf(function_code, "new ");
|
||||
}
|
||||
}
|
||||
if (static_flag)
|
||||
Printf(function_code, "static ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue