- or download this
#define CFG_USED(type, name, stuff) \
{ .compFunc = compare_ ## type; /* */ },
...
#define CFG_USE_int CFG_UNUSED
#endif
...
- or download this
static inline int _inline_cmpfunc_int(void *a, void *b)
{
int _a = *(int*)a, _b = *(int*)b;
return (_a > _b) - (_a < _b);
}
- or download this
static foo
compare_foo(void *a, void *b) { return _inline_cmpfunc_foo(a, b); }