1 typedef struct Plug Plug
;
2 typedef struct Visitor Visitor
;
3 typedef struct Error Error
;
8 static void plug_add_property_full(Plug
*plug
, const char *name
,
10 EtterTrampoline
*getter
,
11 EtterTrampoline
*setter
)
13 printf("%s %s\n", name
, type
);
16 static void foo_set_bar(Plug
*plug
, int bar
)
20 static int foo_get_bar(Plug
*plug
)
25 int main(int argc
, char **argv
)
27 printf("%s\n", typename(int8_t));
28 printf("%s\n", typename(int16_t));
29 printf("%s\n", typename(int32_t));
30 printf("%s\n", typename(int64_t));
31 printf("%s\n", typename(uint8_t));
32 printf("%s\n", typename(uint16_t));
33 printf("%s\n", typename(uint32_t));
34 printf("%s\n", typename(uint64_t));
35 printf("%s\n", typename(char *));
36 printf("%s\n", typename(void *));
38 plug_add_property(0, "bar", int, &foo_get_bar
, &foo_set_bar
);