Go to the source code of this file.
Data Structures | |
struct | as_boolean |
Functions | |
static void | as_boolean_destroy (as_boolean *boolean) |
static as_boolean * | as_boolean_fromval (const as_val *v) |
static bool | as_boolean_get (const as_boolean *boolean) |
static bool | as_boolean_getorelse (const as_boolean *boolean, bool fallback) |
AS_EXTERN as_boolean * | as_boolean_init (as_boolean *boolean, bool value) |
AS_EXTERN as_boolean * | as_boolean_new (bool value) |
static bool | as_boolean_tobool (const as_boolean *boolean) |
static as_val * | as_boolean_toval (const as_boolean *boolean) |
AS_EXTERN void | as_boolean_val_destroy (as_val *v) |
AS_EXTERN uint32_t | as_boolean_val_hashcode (const as_val *v) |
AS_EXTERN char * | as_boolean_val_tostring (const as_val *v) |
Variables | |
AS_EXTERN const as_boolean | as_false |
AS_EXTERN const as_boolean | as_true |
|
inlinestatic |
Destroy the as_boolean
and release associated resources.
boolean | The as_boolean to destroy. |
Definition at line 116 of file as_boolean.h.
References as_val_destroy.
|
inlinestatic |
Convert from an as_val.
Definition at line 170 of file as_boolean.h.
References AS_BOOLEAN, and as_util_fromval.
|
inlinestatic |
Get the bool value.
Definition at line 138 of file as_boolean.h.
References as_boolean::as_boolean_getorelse().
|
inlinestatic |
Get the bool value. If boolean is NULL, then return the fallback value.
Definition at line 129 of file as_boolean.h.
AS_EXTERN as_boolean * as_boolean_init | ( | as_boolean * | boolean, |
bool | value | ||
) |
Initialize a stack allocated as_boolean
with the given boolean value.
boolean | The as_boolean to initialize. |
value | The bool value. |
AS_EXTERN as_boolean * as_boolean_new | ( | bool | value | ) |
Creates a new heap allocated as_boolean
and initializes with the given boolean value.
value | The bool value. |
|
inlinestatic |
Get the bool value.
Definition at line 148 of file as_boolean.h.
References as_boolean::as_boolean_getorelse().
|
inlinestatic |
Convert to an as_val.
Definition at line 161 of file as_boolean.h.
Internal helper function for destroying an as_val.
Internal helper function for getting the hashcode of an as_val.
Internal helper function for getting the string representation of an as_val.
AS_EXTERN const as_boolean as_false |
False value.
Use this when you need to use an as_boolean
containing true
, rather than allocating a new as_boolean
.
AS_EXTERN const as_boolean as_true |
True value.
Use this when you need to use an as_boolean
containing true
, rather than allocating a new as_boolean
.