PageRenderTime 16ms CodeModel.GetById 14ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/function_typedef.i

#
Swig | 20 lines | 13 code | 7 blank | 0 comment | 0 complexity | 9ae2e7629584c296037cbfbe471097c1 MD5 | raw file
 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