Go to the source code of this file.
Data Structures | |
struct | as_integer |
Functions | |
static void | as_integer_destroy (as_integer *integer) |
static as_integer * | as_integer_fromval (const as_val *v) |
static int64_t | as_integer_get (const as_integer *integer) |
static int64_t | as_integer_getorelse (const as_integer *integer, int64_t fallback) |
AS_EXTERN as_integer * | as_integer_init (as_integer *integer, int64_t value) |
AS_EXTERN as_integer * | as_integer_new (int64_t value) |
static int64_t | as_integer_toint (const as_integer *integer) |
static as_val * | as_integer_toval (const as_integer *i) |
AS_EXTERN void | as_integer_val_destroy (as_val *v) |
AS_EXTERN uint32_t | as_integer_val_hashcode (const as_val *v) |
AS_EXTERN char * | as_integer_val_tostring (const as_val *v) |
|
inlinestatic |
Destroy the as_integer
and release resources.
integer | The integer to destroy. |
Definition at line 172 of file as_integer.h.
|
inlinestatic |
Convert from an as_val.
Definition at line 226 of file as_integer.h.
|
inlinestatic |
Get the int64_t value.
Definition at line 194 of file as_integer.h.
|
inlinestatic |
Get the int64_t value. If integer is NULL, then return the fallback value.
Definition at line 185 of file as_integer.h.
AS_EXTERN as_integer * as_integer_init | ( | as_integer * | integer, |
int64_t | value ) |
Initialize a stack allocated as_integer
with the given integer value.
as_integer_destroy() is not required for a stack allocated as_integer.
integer | The as_integer to initialize. |
value | The integer value. |
AS_EXTERN as_integer * as_integer_new | ( | int64_t | value | ) |
Creates a new heap allocated as_integer.
When the as_integer
is no longer needed, you should release it an it's resources:
value | The integer value. |
|
inlinestatic |
Get the int64_t value.
Definition at line 204 of file as_integer.h.
|
inlinestatic |
Convert to an as_val.
Definition at line 217 of file as_integer.h.
Internal helper function for destroying an as_val.
Internal helper function for getting the hashcode of an as_val.