From c64a331078cf63f5931e11ae75c1cf5144079035 Mon Sep 17 00:00:00 2001 From: Mark Rose Date: Mon, 11 Aug 2003 01:05:05 +0000 Subject: [PATCH] Directors ignore private ctors git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4988 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 6 ++++++ Source/Modules/lang.cxx | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGES.current b/CHANGES.current index 635b3b82b..dcf5c1836 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,5 +1,11 @@ Version 1.3.20 (In progress) ============================ +08/10/2003: mrose (Mark Rose) + Fixed constructor generation for director classes to ignore private + constructors. Protected constructors are also ignored for now, pending + a solution to the problem of wrapping classes that only define protected + constructors. + 08/07/2003: cheetah (William Fulton) New commandline option -outdir to specify where the language specific files are to be generated. This is useful for target languages like Python, diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index c3c7c0c56..c5762a9c7 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -1473,8 +1473,11 @@ int Language::classDirectorConstructors(Node *n) { for (ni = Getattr(n, "firstChild"); ni; ni = nextSibling(ni)) { nodeType = Getattr(ni, "nodeType"); if (!Cmp(nodeType, "constructor")) { - classDirectorConstructor(ni); - constructor = 1; + String* access = Getattr(ni, "access"); + if (!access || !Cmp(access, "public")) { + classDirectorConstructor(ni); + constructor = 1; + } } } if (!constructor) {