Messages in this thread | | | From | Rusty Russell <> | Subject | [PATCH 0/6] typesafe callbacks | Date | Mon, 21 Apr 2008 08:58:59 +1000 |
| |
The idea is to create a general typesafe callback mechanism which doesn't break compile on existing code and doesn't allow any unsafe callback types.
Al had a very long timer conversion series followed by a different mechanism, and that just covered timers; unfortunately that technique provides insufficient typechecking for the general case (eg. int return types and callback functions which take integer args as well as the data arg).
Note that these typechecks end up being *too* strict in some cases, disallowing some potentially valid cases. But since you can still use the current via-void* method, these corner cases lose nothing.
| |