From badf7355346fe345aac8faab721f09e01c7463b3 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 17 Oct 2005 13:28:59 +0000 Subject: [PATCH] fix friend bug #1323114 git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7670 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/friends.i | 22 ++++++++++++++++++++++ Source/Modules/utils.cxx | 3 +-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Examples/test-suite/friends.i b/Examples/test-suite/friends.i index 65db63046..93b30028d 100644 --- a/Examples/test-suite/friends.i +++ b/Examples/test-suite/friends.i @@ -132,6 +132,28 @@ private: C val; }; + + namespace ns1 { + + void bas() {} + + void baz() {} + + namespace ns2 { + class Foo { + public: + Foo::Foo() {}; + friend void bar(); + friend void ns1::baz(); + void Foo::member() { } + + }; + void bar() {} + + } + + + }; %} %template(D_i) D; diff --git a/Source/Modules/utils.cxx b/Source/Modules/utils.cxx index bab2f2ada..8c93ce0dd 100644 --- a/Source/Modules/utils.cxx +++ b/Source/Modules/utils.cxx @@ -42,7 +42,7 @@ int is_member_director(Node* member) } -/* Clean overloaded list. Removes templates, friends, ignored, and errors */ +/* Clean overloaded list. Removes templates, ignored, and errors */ void clean_overloaded(Node *n) { Node *nn = Getattr(n,"sym:overloaded"); @@ -52,7 +52,6 @@ void clean_overloaded(Node *n) { if ((Strcmp(nodeType(nn),"template") == 0) || (GetFlag(nn,"feature:ignore")) || (Getattr(nn,"error")) || - // (checkAttribute(nn,"storage","friend")) || ((Strcmp(nodeType(nn),"using") == 0) && !firstChild(nn))) { /* Remove from overloaded list */ Node *ps = Getattr(nn,"sym:previousSibling");