Remove protected method wrapper (directors) which was being generated when there was no corresponding method in the C++ class. It seemed to be adding in proxy director methods to derived classes if the base class had a protected virtual method. There is no reason to have the extra method (it doesn't happen with public methods) and is the wrong place to add extra methods in any case - should be done in one of the earlier parse stages.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9144 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-06-02 22:15:24 +00:00
commit 609a8fe62e

View file

@ -2317,33 +2317,6 @@ int Language::classHandler(Node *n) {
/* emit director disown method */
if (hasDirector) {
classDirectorDisown(n);
/* emit all the protected virtual members as needed */
if (dirprot_mode()) {
Node *vtable = Getattr(n, "vtable");
String* symname = Getattr(n, "sym:name");
Node *item;
Iterator k;
AccessMode old_mode = cplus_mode;
cplus_mode = PROTECTED;
for (k = First(vtable); k.key; k = Next(k)) {
item = k.item;
Node *method = Getattr(item, "methodNode");
SwigType *type = Getattr(method,"nodeType");
if (Strcmp(type,"cdecl") !=0 ) continue;
String* methodname = Getattr(method,"sym:name");
String* wrapname = NewStringf("%s_%s", symname,methodname);
if (!Getattr(symbols,wrapname) && (!is_public(method))) {
Node* m = Copy(method);
Setattr(m, "director", "1");
Setattr(m,"parentNode", n);
cDeclaration(m);
Delete(m);
}
Delete(wrapname);
}
cplus_mode = old_mode;
}
}
return SWIG_OK;