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:
William S Fulton 2006-07-04 21:00:55 +00:00
commit 32abf157f7
4 changed files with 46 additions and 10 deletions

View file

@ -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;