3 ms·
I don't get the point. Why not use the generic function type? void *(*routine)(void *) If you have a function already, just create a simple wrapper once.
by tspiteri 14y ago
I don't get the point. Why not use the generic function type?
void *(*routine)(void *)
If you have a function already, just create a simple wrapper once. In the code shown, the wrapping has to be done by the caller of apply().
And this apply() doesn't work on all functions anyway. Casting an array of long into an array of void* makes quite a few assumptions and is very limited. What would you do if your original function takes a struct as an argument?