#include <stddef.h>
Go to the source code of this file.
|
#define | as_util_fromval(object, type_id, type) (object && as_val_type(object) == type_id ? (type *) object : NULL) |
|
#define | as_util_hook(hook, default, object, ...) (object && object->hooks && object->hooks->hook ? object->hooks->hook(object, ##__VA_ARGS__) : default) |
|
#define | as_util_hook_ret_void(hook, object, ...) if (object && object->hooks && object->hooks->hook) object->hooks->hook(object, ##__VA_ARGS__) |
|
◆ as_util_fromval
#define as_util_fromval |
( |
| object, |
|
|
| type_id, |
|
|
| type ) (object && as_val_type(object) == type_id ? (type *) object : NULL) |
◆ as_util_hook
#define as_util_hook |
( |
| hook, |
|
|
| default, |
|
|
| object, |
|
|
| ... ) (object && object->hooks && object->hooks->hook ? object->hooks->hook(object, ##__VA_ARGS__) : default) |
Calls a hook on a object. If hook not found, then return the default value.
Definition at line 34 of file as_util.h.
◆ as_util_hook_ret_void
#define as_util_hook_ret_void |
( |
| hook, |
|
|
| object, |
|
|
| ... ) if (object && object->hooks && object->hooks->hook) object->hooks->hook(object, ##__VA_ARGS__) |