aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/eolian/data/function_types.eot
blob: 5eae0e2da4e3bf6248309480718ced050dd37b8d (plain) (blame)
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
30

// typedef void (*VoidFunc)(void *data);
function VoidFunc {
};

// typedef const char *(*SimpleFunc)(void *data, int a, double b);
function SimpleFunc {
  params {
    a: int;
    b: double;
  }
  return: string;
};

// typedef double (*ComplexFunc)(void *data, const char *a, const char **b);
function ComplexFunc {
  params {
    @in c: string;
    @out d: string @owned;
  }
  return: double;
};

// typedef void (*FuncAsArgFunc)(void *data, VoidFunc cb, SimpleFunc another_cb);
function FuncAsArgFunc {
  params {
    cb: VoidFunc;
    another_cb: SimpleFunc;
  }
};