Fix directors + protected pure virtual members + protected

constructor.

Now it doesn't crash, you don't need to use dirprot, and no, it is not
emitting all the protected members, unless dirprot is used.

Swig only emits the protected members or constructors needed to prevent
the compilation for crashing. The rest of the protected members
are emitted when dirprot is used.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6493 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-24 05:58:15 +00:00
commit 8ac154a748
4 changed files with 213 additions and 30 deletions

View file

@ -1615,8 +1615,14 @@ module_directive: MODULE options idstring {
$$ = new_node("module");
Setattr($$,"name",$3);
if ($2) Setattr($$,"options",$2);
if ($2 && Getattr($2,"directors") && Getattr($2,"dirprot"))
if ($2 && Getattr($2,"directors")) {
/*
we set dirprot_mode here to 1, just to save the
symbols. Later, the language module must decide
what to do with them.
*/
dirprot_mode = 1;
}
if (!ModuleName) ModuleName = NewString($3);
if (!module_node) module_node = $$;
}