promote the 'using' methods to public. Also, fix a sef. fault for using with pointers, see using_pointers.i

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2003-12-09 23:24:37 +00:00
commit 66ae9df8b1
3 changed files with 95 additions and 2 deletions

View file

@ -1975,8 +1975,18 @@ int Language::validIdentifier(String *s) {
* ----------------------------------------------------------------------------- */
int Language::usingDeclaration(Node *n) {
if (cplus_mode == CPLUS_PUBLIC) {
emit_children(n);
const char* access = 0;
if ((cplus_mode == CPLUS_PUBLIC)) {
Node* np = Copy(n);
Node *c;
for (c = firstChild(np); c; c = nextSibling(c)) {
Setattr(c, "access", "public");
/* it seems for some cases this is needed, like A* A::boo() */
if (CurrentClass)
Setattr(c, "parentNode", CurrentClass);
emit_one(c);
}
Delete(np);
}
return SWIG_OK;
}