From 93dd1e228e1bfbb83bdf8a585dfe856f1a9be06b Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Mon, 8 Dec 2003 22:50:46 +0000 Subject: [PATCH] fix problem with protected members, and add some of them to the test git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5507 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/director_protected.i | 4 ++++ Source/Modules/lang.cxx | 1 + 2 files changed, 5 insertions(+) diff --git a/Examples/test-suite/director_protected.i b/Examples/test-suite/director_protected.i index 4582f48e0..c26980f4f 100644 --- a/Examples/test-suite/director_protected.i +++ b/Examples/test-suite/director_protected.i @@ -35,10 +35,14 @@ public: return "Bar::pong();" + Foo::pong(); } + int hello; + protected: std::string ping() { return "Bar::ping();"; }; + + int hi; }; diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index d192a8c57..1c6cc7770 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -701,6 +701,7 @@ int Language::cDeclaration(Node *n) { if (CurrentClass && (cplus_mode == CPLUS_PROTECTED) && (!directors || !director_protected_mode || + Cmp(storage,"virtual") || !is_member_director(CurrentClass,n))) return SWIG_NOWRAP; if (Cmp(storage,"typedef") == 0) {