P99

◆ P99_CALLBACK_PUSH

#define P99_CALLBACK_PUSH (   STCK,
  ... 
)    p00_callback_push((STCK), P99_NEW(p99_callback_el, __VA_ARGS__))
related

Register a function as a callback on STCK.

Parameters
STCKshould be of type p99_callback_stack*

The first of the arguments in the variable argument list should be a function pointer, either of type p99_callback_voidptr_func or p99_callback_void_func. In the first case a following argument, if any, should be a data pointer (i.e compatible to void*), which will be passed as parameter to the function. If no such argument is given the function is called with parameter 0.

This is as if there'd be two overloaded functions as

p99_callback_push(p99_callback_stack*, p99_callback_voidptr_func*, void* = 0);
See also
p99_callback

Definition at line 149 of file p99_callback.h.

p99_callback_stack::p99_callback_voidptr_func
void p99_callback_voidptr_func(void *)
Function type for a callback with void* argument.
Definition: p99_callback.h:57
p99_callback_stack
A data structure to register callbacks.
Definition: p99_callback.h:43
p99_callback_stack::p99_callback_void_func
void p99_callback_void_func(void)
Function type for a callback without arguments.
Definition: p99_callback.h:51