%rename(x) Foo::y();
%inline %{
class Foo {
protected:
void x();
public:
void y();
};
%}
will work in plain or plain director mode, but it will complain the
same as before with director protected support.
The reason is that the parser emmits the warning, and at that stage it
is not possible to decide if the protected Foo::x() could or not
conflict with the renamed Foo::y(), since Foo::x() could be virtual,
even when no "virtual" attribute is used.
Core:
parser.y: Detect the dirprot mode and prevents the generation of
protected symbols at the parsing stage.
lang.cxx: Export the director_protected_mode for parser.y and the
director protected member detection is much cleaner.
main.cxx: Fix the -dirprot flag, it was working in SWIG_FEATURE but
not in the command line.(minor thing not relate to the error).
swigmod.h: added Lang::dirprot_mode() for cleaner detection.
utils.cxx: is_member_director() centralizes and improve the test.
Test suite:
protected_rename.i: added %inline, so it can compile now.
director_protected.i: more cases, checking using %rename.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5530 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c15ba7905c
commit
7335663344
7 changed files with 89 additions and 28 deletions
|
|
@ -214,12 +214,15 @@ public:
|
|||
/* Allow director related code generation */
|
||||
void allow_directors(int val = 1);
|
||||
|
||||
/* Allow director protected members related code generation */
|
||||
void allow_dirprot(int val = 1);
|
||||
|
||||
/* Return true if directors are enabled */
|
||||
int directorsEnabled() const;
|
||||
|
||||
/* Allow director protected members related code generation */
|
||||
void allow_dirprot(int val = 1);
|
||||
|
||||
/* Returns the dirprot mode */
|
||||
int dirprot_mode() const;
|
||||
|
||||
/* Set none comparison string */
|
||||
void setSubclassInstanceCheck(String *s);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue