fix missed check for director_prot_ctor_code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6487 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8ad2d4c7d3
commit
0a97681b20
1 changed files with 4 additions and 10 deletions
|
|
@ -1672,7 +1672,8 @@ 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")) {
|
||||||
if (is_public(ni) || (dirprot_mode() && is_protected(ni))) {
|
int need_prot = director_prot_ctor_code && dirprot_mode() && is_protected(ni);
|
||||||
|
if (is_public(ni) || need_prot) {
|
||||||
classDirectorConstructor(ni);
|
classDirectorConstructor(ni);
|
||||||
constructor = 1;
|
constructor = 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1967,7 +1968,6 @@ int Language::classHandler(Node *n) {
|
||||||
Iterator k;
|
Iterator k;
|
||||||
int old_mode = cplus_mode;
|
int old_mode = cplus_mode;
|
||||||
cplus_mode = CPLUS_PROTECTED;
|
cplus_mode = CPLUS_PROTECTED;
|
||||||
|
|
||||||
for (k = First(vtable); k.key; k = Next(k)) {
|
for (k = First(vtable); k.key; k = Next(k)) {
|
||||||
item = k.item;
|
item = k.item;
|
||||||
Node *method = Getattr(item, "methodNode");
|
Node *method = Getattr(item, "methodNode");
|
||||||
|
|
@ -2089,13 +2089,8 @@ Language::constructorHandler(Node *n) {
|
||||||
String *symname = Getattr(n,"sym:name");
|
String *symname = Getattr(n,"sym:name");
|
||||||
String *mrename = Swig_name_construct(symname);
|
String *mrename = Swig_name_construct(symname);
|
||||||
String *director_ctor = director_ctor_code;
|
String *director_ctor = director_ctor_code;
|
||||||
if (!is_public(n)) {
|
if (director_prot_ctor_code) {
|
||||||
if (director_prot_ctor_code && is_protected(n)) {
|
if (is_protected(n) || Getattr(Swig_methodclass(n),"abstract")) {
|
||||||
director_ctor = director_prot_ctor_code;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Getattr(Swig_methodclass(n),"abstract")) {
|
|
||||||
if (director_prot_ctor_code) {
|
|
||||||
director_ctor = director_prot_ctor_code;
|
director_ctor = director_prot_ctor_code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2610,7 +2605,6 @@ int Language::abstractClassTest(Node *n) {
|
||||||
return dirabstract;
|
return dirabstract;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Language::setSubclassInstanceCheck(String *nc) {
|
void Language::setSubclassInstanceCheck(String *nc) {
|
||||||
none_comparison = nc;
|
none_comparison = nc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue