#include <aerospike/as_std.h>
Go to the source code of this file.
Data Structures | |
struct | as_val |
Macros | |
#define | as_val_destroy(__v) ( as_val_val_destroy((as_val *)__v) ) |
#define | as_val_hashcode(__v) ( as_val_val_hashcode((as_val *)__v) ) |
#define | as_val_reserve(__v) ( as_val_val_reserve((as_val *)__v) ) |
#define | as_val_tostring(__v) ( as_val_val_tostring((as_val *)__v) ) |
#define | as_val_type(__v) (__v ? (as_val_type_e)((as_val *)__v)->type : AS_UNDEF) |
Typedefs | |
typedef uint8_t | as_val_t |
Enumerations | |
enum | as_val_type_e { AS_UNDEF = 0 , AS_UNKNOWN = 0 , AS_NIL = 1 , AS_BOOLEAN = 2 , AS_INTEGER = 3 , AS_STRING = 4 , AS_LIST = 5 , AS_MAP = 6 , AS_REC = 7 , AS_PAIR = 8 , AS_BYTES = 9 , AS_DOUBLE = 10 , AS_GEOJSON = 11 , AS_CMP_EXT , AS_CMP_WILDCARD , AS_CMP_INF , AS_VAL_T_MAX } |
Functions | |
static as_val * | as_val_cons (as_val *val, as_val_t type, bool free) |
static void | as_val_init (as_val *v, as_val_t type, bool free) |
AS_EXTERN bool | as_val_tobool (const as_val *v) |
AS_EXTERN as_val * | as_val_val_destroy (as_val *) |
AS_EXTERN uint32_t | as_val_val_hashcode (const as_val *) |
AS_EXTERN as_val * | as_val_val_reserve (as_val *) |
AS_EXTERN char * | as_val_val_tostring (const as_val *) |
#define as_val_destroy | ( | __v | ) | ( as_val_val_destroy((as_val *)__v) ) |
Decrement the as_val.count
of a value. If as_val.count
reaches 0 (zero) and as_val.free
is true, then free the as_val
instance.
__v | The as_val to be decremented. |
as_val.count
> 0. Otherwise NULL. #define as_val_hashcode | ( | __v | ) | ( as_val_val_hashcode((as_val *)__v) ) |
#define as_val_reserve | ( | __v | ) | ( as_val_val_reserve((as_val *)__v) ) |
Increment the as_val.count
of a value.
__v | The as_val to be incremented. |
#define as_val_tostring | ( | __v | ) | ( as_val_val_tostring((as_val *)__v) ) |
#define as_val_type | ( | __v | ) | (__v ? (as_val_type_e)((as_val *)__v)->type : AS_UNDEF) |
Returns the as_val.type
of a value.
__v | The as_val to get the type of |
enum as_val_type_e |
Initialize an as_val. Should only be used by subtypes.
Definition at line 191 of file as_val.h.
References as_val::count, as_val::free, type, and as_val::type.
Initialize an as_val. Should only be used by subtypes.
Definition at line 178 of file as_val.h.
References as_val::count, as_val::free, type, and as_val::type.
Convert as_boolean or as_integer to bool. Otherwise, return false.
Helper function for decrementing the count of a value, and if count==0 and free==true, then free the value.
Helper function for calculating the hash value.
Helper function for incrementing the count of a value.