summaryrefslogtreecommitdiff
path: root/Examples/test-suite/sneaky1.i
blob: bacf4a97806343ec9f9bc6ad95d16a9c5832b792 (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
26
27
28
29
%module sneaky1

%{
int add(int x, int y) {
   return x+y;
}

int sub(int x, int y) {
   return x-y;
}
int mul(int x, int y) {
   return x*y;
}

int divide(int x, int y) {
   return x/y;
}
%}

%inline %{
typedef int binop(int,int);
%}

binop add,sub,mul,divide;