/trunk/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
- %module function_typedef
- %inline %{
- typedef int binop_t(int, int);
- int do_binop1(binop_t f, int x, int y) {
- return f(x,y);
- }
- int do_binop2(binop_t *f, int x, int y) {
- return (*f)(x,y);
- }
- int do_binop3(int f(int,int), int x, int y) {
- return f(x,y);
- }
- %}