/tags/rel-1.3.35/Examples/test-suite/function_typedef.i
Swig | 20 lines | 13 code | 7 blank | 0 comment | 0 complexity | 9ae2e7629584c296037cbfbe471097c1 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1%module function_typedef
2
3%inline %{
4
5typedef int binop_t(int, int);
6
7int do_binop1(binop_t f, int x, int y) {
8 return f(x,y);
9}
10
11int do_binop2(binop_t *f, int x, int y) {
12 return (*f)(x,y);
13}
14
15int do_binop3(int f(int,int), int x, int y) {
16 return f(x,y);
17}
18%}
19
20