fix parentnode for %extend methods

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9442 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-10-12 19:47:24 +00:00
commit b7057f7ae8
3 changed files with 5 additions and 5 deletions

View file

@ -986,9 +986,9 @@ Swig_MethodToFunction(Node *n, String *classname, int flags, SwigType *director_
Node*
Swig_methodclass(Node *n) {
Node* type = Getattr(n, k_nodetype);
if (!Cmp(type, "class")) return n;
return Getattr(n, k_parentnode);
Node* nodetype = Getattr(n, k_nodetype);
if (!Cmp(nodetype, "class")) return n;
return GetFlag(n, "feature:extend") ? Getattr(Getattr(n, k_parentnode), k_parentnode) : Getattr(n, k_parentnode);
}
int