Directors ignore private ctors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
81e4171741
commit
e87d1bb79b
2 changed files with 11 additions and 2 deletions
|
|
@ -1,5 +1,11 @@
|
||||||
Version 1.3.20 (In progress)
|
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)
|
08/07/2003: cheetah (William Fulton)
|
||||||
New commandline option -outdir <dir> to specify where the language specific
|
New commandline option -outdir <dir> to specify where the language specific
|
||||||
files are to be generated. This is useful for target languages like Python,
|
files are to be generated. This is useful for target languages like Python,
|
||||||
|
|
|
||||||
|
|
@ -1473,10 +1473,13 @@ int Language::classDirectorConstructors(Node *n) {
|
||||||
for (ni = Getattr(n, "firstChild"); ni; ni = nextSibling(ni)) {
|
for (ni = Getattr(n, "firstChild"); ni; ni = nextSibling(ni)) {
|
||||||
nodeType = Getattr(ni, "nodeType");
|
nodeType = Getattr(ni, "nodeType");
|
||||||
if (!Cmp(nodeType, "constructor")) {
|
if (!Cmp(nodeType, "constructor")) {
|
||||||
|
String* access = Getattr(ni, "access");
|
||||||
|
if (!access || !Cmp(access, "public")) {
|
||||||
classDirectorConstructor(ni);
|
classDirectorConstructor(ni);
|
||||||
constructor = 1;
|
constructor = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!constructor) {
|
if (!constructor) {
|
||||||
classDirectorDefaultConstructor(n);
|
classDirectorDefaultConstructor(n);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue