All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros
as_util.h File Reference
#include <stddef.h>
#include <citrusleaf/alloc.h>
+ Include dependency graph for as_util.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#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)
 

Macro Definition Documentation

#define as_util_fromval (   object,
  type_id,
  type 
)    (object && as_val_type(object) == type_id ? (type *) object : NULL)

Converts from an as_val.

Definition at line 42 of file as_util.h.

#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 36 of file as_util.h.