1 #ifndef TYPECHECK_H_INCLUDED
2 #define TYPECHECK_H_INCLUDED
5 * Check at compile time that something is of a particular type.
6 * Always evaluates to 1 so you may use it easily in comparisons.
8 #define typecheck(type,x) \
11 (void)(&__dummy == &__dummy2); \
16 * Check at compile time that 'function' is a certain type, or is a pointer
17 * to that type (needs to use typedef for the function type.)
19 #define typecheck_fn(type,function) \
20 ({ typeof(type) __tmp = function; \
24 #endif /* TYPECHECK_H_INCLUDED */
This page took 0.029745 seconds and 5 git commands to generate.