diff --git a/CHANGES.current b/CHANGES.current index ad2f1e764..9c014aa82 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.10 (in progress) ============================ +2013-01-28: William + [Java] Apply patch SF #335 - Truly ignore constructors in directors with %ignore. + 2013-01-18: Brant Kyser [Java] Patch #15 - Allow the use of the nspace feature without the -package commandline option. This works as long and the new jniclasspackage pragma is used to place the JNI intermediate class diff --git a/Examples/test-suite/director_ignore.i b/Examples/test-suite/director_ignore.i index 05ba17ce1..57cbc13d8 100644 --- a/Examples/test-suite/director_ignore.i +++ b/Examples/test-suite/director_ignore.i @@ -68,21 +68,6 @@ class DAbstractIgnores virtual double OverloadedProtectedMethod() = 0; }; -class DIgnoreConstructor -{ - public: - virtual ~DIgnoreConstructor() {} - DIgnoreConstructor(std::string s, int i) {} - DIgnoreConstructor(bool b) {} -}; - -class DIgnoreOnlyConstructor -{ - public: - virtual ~DIgnoreOnlyConstructor() {} - DIgnoreOnlyConstructor(bool b) {} -}; - template class DTemplateAbstractIgnores { T t; @@ -101,3 +86,37 @@ template class DTemplateAbstractIgnores %template(DTemplateAbstractIgnoresInt) DTemplateAbstractIgnores; +class DIgnoreConstructor +{ + public: + virtual ~DIgnoreConstructor() {} + DIgnoreConstructor(std::string s, int i) {} + DIgnoreConstructor(bool b) {} +}; + +class DIgnoreOnlyConstructor +{ + public: + virtual ~DIgnoreOnlyConstructor() {} + DIgnoreOnlyConstructor(bool b) {} +}; + +%{ +class DIgnoreConstructor +{ + public: + virtual ~DIgnoreConstructor() {} + DIgnoreConstructor(std::string s, int i) {} + private: // Hide constructor + DIgnoreConstructor(bool b) {} +}; + +class DIgnoreOnlyConstructor +{ + public: + virtual ~DIgnoreOnlyConstructor() {} + private: // Hide constructor + DIgnoreOnlyConstructor(bool b) {} +}; +%} + diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index 4f1657825..69df79271 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -1995,6 +1995,9 @@ int Language::classDirectorConstructors(Node *n) { for (ni = Getattr(n, "firstChild"); ni; ni = nextSibling(ni)) { nodeType = Getattr(ni, "nodeType"); if (Cmp(nodeType, "constructor") == 0) { + if (GetFlag(ni, "feature:ignore")) + continue; + Parm *parms = Getattr(ni, "parms"); if (is_public(ni)) { /* emit public constructor */