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) {