News for hackers. Stuff that matters.
Re:What is your favorite C programming trick? (2009) by btrask on Monday November 23, 2020 @03:13AM (#25184598)
I tried making it a plain function at one point but ran into some weirdness around using void * * with certain arguments (const buffers?). You don't want to accept plain void * because it's too easy to pass a pointer instead of a pointer to a pointer. Using a macro is (ironically) more type safe.

Maybe someone else could figure out how to do it properly, since I'd definitely prefer a function.

There are no comments on this comment yet.