more on protected ctors+directors

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-11-28 10:35:49 +00:00
commit a603669c8f
2 changed files with 3 additions and 2 deletions

View file

@ -97,6 +97,7 @@ void cparse_normalize_void(Node *n) {
int need_protected(Node* n, int dirprot_mode)
{
/* First, 'n' looks like a function */
if (!dirprot_mode) return 0;
if ((Strcmp(nodeType(n),"cdecl") == 0) &&
SwigType_isfunction(Getattr(n,"decl"))) {
String *storage = Getattr(n,"storage");

View file

@ -535,6 +535,7 @@ symbol_head(Node *n)
return n;
}
Node *
Swig_symbol_add(String_or_char *symname, Node *n) {
Hash *c, *cn, *cl = 0;
@ -721,7 +722,7 @@ Swig_symbol_add(String_or_char *symname, Node *n) {
assert(!Getattr(n,"sym:overname"));
Setattr(n,"sym:overname", NewStringf("__SWIG_%d", pn));
/*Printf(stdout,"%s %s %s\n", symname, Getattr(n,"decl"), Getattr(n,"sym:overname")); */
if (Getattr(n,"access")) {
if (Getattr(n,"access") && !Getattr(n,"feature:director")) {
/* add the protected/private members at the top of the overload list*/
Node *hl = symbol_head(cl);
Setattr(n,"sym:nextSibling",hl);
@ -732,7 +733,6 @@ Swig_symbol_add(String_or_char *symname, Node *n) {
}
Setattr(cl,"sym:overloaded",c);
Setattr(n,"sym:overloaded",c);
return n;
}