blob: fcea0729b0ef86fe4e107cf5bb220ef9626071a5 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef MIDLTESTS_C_CODE
[
uuid("225b9fcb-eb3d-497b-8b0b-591f049a2507"),
pointer_default(unique)
]
interface midltests
{
[switch_type(short)] union u {
[case(0)];
[case(2)] short s;
[case(4)] long l;
[case(8)] hyper h;
};
long midltests_fn(
[in] short level,
[in,switch_is(level)] union u u
);
}
#elif MIDLTESTS_C_CODE
static void midltests(void)
{
union u u;
u.h = 0xFFFFFFFFFFFFFFFFLL;
cli_midltests_fn(0, u);
cli_midltests_fn(2, u);
cli_midltests_fn(4, u);
cli_midltests_fn(8, u);
}
long srv_midltests_fn(short level, union u u)
{
printf("srv_midltests_fn: Start\n");
printf("srv_midltests_fn: End\n");
return 0x65757254;
}
#endif
|