Fix for 'self' being used as a parameter name
This commit is contained in:
parent
3855b96459
commit
6029b2f7d8
5 changed files with 19 additions and 12 deletions
|
|
@ -1,13 +1,15 @@
|
|||
// Checks if collisions of argument names with target language keywords are
|
||||
// resolved properly when directors are used (currently only »abstract« for
|
||||
// C#, D and Java is checked).
|
||||
// resolved properly when directors are used
|
||||
%module(directors="1") director_keywords
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_KEYWORD);
|
||||
|
||||
%feature("director") Foo;
|
||||
|
||||
%inline %{
|
||||
struct Foo {
|
||||
virtual ~Foo() {}
|
||||
virtual void bar(int abstract) {}
|
||||
virtual void check_abstract(int abstract) {} // for Java, C#, D...
|
||||
virtual void check_self(int self) {} // self for Python
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
5
Examples/test-suite/python/director_keywords_runme.py
Normal file
5
Examples/test-suite/python/director_keywords_runme.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from director_keywords import *
|
||||
|
||||
f = Foo()
|
||||
f.check_self(20)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue