X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftypesafe_cb%2F_info;fp=ccan%2Ftypesafe_cb%2F_info;h=2fe4fec0299dcef50d486deae47dcb55dba92b9a;hp=7417febe601e7bc3d1f7b1cb2ddb32ff14625103;hb=b0fa019adb998c20a8740f5696b61ae87d2a77a6;hpb=076877c266706ba432987195422a1e8653bd0c3b diff --git a/ccan/typesafe_cb/_info b/ccan/typesafe_cb/_info index 7417febe..2fe4fec0 100644 --- a/ccan/typesafe_cb/_info +++ b/ccan/typesafe_cb/_info @@ -5,7 +5,7 @@ /** * typesafe_cb - macros for safe callbacks. * - * The basis of the typesafe_cb header is cast_if_type(): a + * The basis of the typesafe_cb header is typesafe_cb_cast(): a * conditional cast macro. If an expression exactly matches a given * type, it is cast to the target type, otherwise it is left alone. * @@ -35,15 +35,16 @@ * the exactly correct function type to match the argument, or a * function which takes a void *. * - * This is where typesafe_cb() comes in: it uses cast_if_type() to + * This is where typesafe_cb() comes in: it uses typesafe_cb_cast() to * cast the callback function if it matches the argument type: * * void _register_callback(void (*cb)(void *arg), void *arg); * #define register_callback(cb, arg) \ - * _register_callback(typesafe_cb(void, (cb), (arg)), (arg)) + * _register_callback(typesafe_cb(void, void *, (cb), (arg)), \ + * (arg)) * * On compilers which don't support the extensions required - * cast_if_type() and friend become an unconditional cast, so your + * typesafe_cb_cast() and friend become an unconditional cast, so your * code will compile but you won't get type checking. * * Example: @@ -72,7 +73,8 @@ * } * #define register_callback(value, cb, arg) \ * _register_callback(value, \ - * typesafe_cb_preargs(int, (cb), (arg), int),\ + * typesafe_cb_preargs(int, void *, \ + * (cb), (arg), int),\ * (arg)) * * static struct callback *find_callback(int value)