summaryrefslogtreecommitdiff
path: root/Examples/test-suite/rename_simple.i
blob: 5616b16ea145c42fe8970a1c879dad2cb8afb357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
%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 {
  enum { ONE = 1, TWO, THREE };
  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;
%}