In c there is a very easy way to wrap a function(for timing/logging/etc) with a macro
#define WRAP(func,args) \
...
func args /*call function with args num of args irrelavent*/ \
...
WRAP(some_func,(arga_a,arg_b)) since it expands to "func (args)"
But eventually you get tired of the drawbacks of macros.
Is there any way to do this in a simple fashion with a function taking a function pointer? It is important that it fits a function with any number of arguments(well we can say less then 7 if it supports 0-6 arguments. and without change to the function.