#include <stddef.h>
#include <citrusleaf/alloc.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, args...) (object && object->hooks && object->hooks->hook ? object->hooks->hook(object, ## args) : default) |
|
#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, |
|
|
|
args... |
|
) |
| (object && object->hooks && object->hooks->hook ? object->hooks->hook(object, ## args) : default) |
Calls a hook on a object. If hook not found, then return the default value.
Definition at line 32 of file as_util.h.