Re:List Processing in C
by timrobinson on Tuesday December 21, 2010 @06:23AM
(#2027515)
My "ugly" comment comes from spending my career programming against APIs like this :)
typedef BOOL (* WNDENUMPROC) (HWND, LPARAM);
BOOL WINAPI EnumWindows(WNDENUMPROC lpEnumFunc, LPARAM lParam);
All hooks, callbacks, etc. use this approach because that's what a closure is on a low enough level. And in C it looks like void()(void userdata).