R - SF #3168676 Fix %rename not working for member variables and methods. Add new simple rename testcase with runtime tests for C# and R
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12432 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1918e2a844
commit
f4c74bc500
6 changed files with 79 additions and 1 deletions
24
Examples/test-suite/rename_simple.i
Normal file
24
Examples/test-suite/rename_simple.i
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
%module rename_simple
|
||||
|
||||
%rename(NewStruct) OldStruct;
|
||||
%rename(NewVariable) OldVariable;
|
||||
%rename(NewInstanceMethod) OldInstanceMethod;
|
||||
%rename(NewInstanceVariable) OldInstanceVariable;
|
||||
%rename(NewStaticMethod) OldStaticMethod;
|
||||
%rename(NewStaticVariable) OldStaticVariable;
|
||||
%rename(NewFunction) OldFunction;
|
||||
%rename(NewGlobalVariable) OldGlobalVariable;
|
||||
|
||||
%inline %{
|
||||
struct OldStruct {
|
||||
OldStruct() : OldInstanceVariable(111) {}
|
||||
int OldInstanceVariable;
|
||||
int OldInstanceMethod() { return 222; }
|
||||
static int OldStaticVariable;
|
||||
static int OldStaticMethod() { return 333; }
|
||||
};
|
||||
int OldStruct::OldStaticVariable = 444;
|
||||
|
||||
int OldFunction() { return 555; }
|
||||
int OldGlobalVariable = 666;
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue