![]() |
Boolean value.
To use the boolean value, you should use one of the two constants:
as_boolean as_true; as_boolean as_false;
Both as_boolean_init()
and as_boolean_new()
should be used sparingly.
Definition at line 45 of file as_boolean.h.
#include "as_boolean.h"
Data Fields | |
bool | value |
![]() | |
uint32_t | count |
bool | free |
as_val_t | type |
Related Symbols | |
(Note that these are not member symbols.) | |
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) |
|
related |
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.
|
related |
Convert from an as_val.
Definition at line 170 of file as_boolean.h.
References AS_BOOLEAN, and as_util_fromval.
|
related |
|
related |
Get the bool value. If boolean is NULL, then return the fallback value.
Definition at line 129 of file as_boolean.h.
|
related |
Initialize a stack allocated as_boolean
with the given boolean value.
boolean | The as_boolean to initialize. |
value | The bool value. |
|
related |
Creates a new heap allocated as_boolean
and initializes with the given boolean value.
value | The bool value. |
|
related |
Get the bool value.
Definition at line 148 of file as_boolean.h.
References as_boolean_getorelse().
|
related |
Convert to an as_val.
Definition at line 161 of file as_boolean.h.
bool as_boolean::value |
The boolean value.
Definition at line 57 of file as_boolean.h.