new explicitcall feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9188 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
37005baff5
commit
32abf157f7
4 changed files with 46 additions and 10 deletions
|
|
@ -973,7 +973,30 @@ Language::functionHandler(Node *n) {
|
|||
} else if (isfriend) {
|
||||
globalfunctionHandler(n);
|
||||
} else {
|
||||
Node* explicit_n = 0;
|
||||
if (GetFlag(n, "feature:explicitcall")) {
|
||||
// Add in an explicit wrapper call to virtual methods
|
||||
if (Cmp(storage, "virtual") == 0 && (cplus_mode == PUBLIC))
|
||||
explicit_n = Copy(n);
|
||||
}
|
||||
|
||||
memberfunctionHandler(n);
|
||||
|
||||
if (explicit_n) {
|
||||
String *new_symname = Copy(Getattr(n,"sym:name"));
|
||||
String *suffix = Getattr(n,"feature:explicitcall:suffix");
|
||||
if (!suffix)
|
||||
suffix = Getattr(parentNode(n),"sym:name");
|
||||
Printv(new_symname, suffix, NIL);
|
||||
Setattr(explicit_n,"sym:name", new_symname);
|
||||
Delattr(explicit_n,"storage");
|
||||
Delattr(explicit_n,"override");
|
||||
Delattr(explicit_n,"hides");
|
||||
SetFlag(explicit_n,"explicitcall");
|
||||
memberfunctionHandler(explicit_n);
|
||||
Delattr(explicit_n,"explicitcall");
|
||||
Delete(explicit_n);
|
||||
}
|
||||
}
|
||||
}
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue