36union as_list_iterator_u;
38struct as_list_hooks_s;
61typedef struct as_list_s {
78 const struct as_list_hooks_s *
hooks;
85typedef struct as_list_hooks_s {
144 int64_t (* get_int64)(
const as_list * list, uint32_t index);
154 double (* get_double)(
const as_list * list, uint32_t index);
164 char * (* get_str)(
const as_list * list, uint32_t index);
190 int (* set_int64)(
as_list * list, uint32_t index, int64_t value);
201 int (* set_double)(
as_list * list, uint32_t index,
double value);
212 int (* set_str)(
as_list * list, uint32_t index,
const char * value);
238 int (* insert_int64)(
as_list * list, uint32_t index, int64_t value);
249 int (* insert_double)(
as_list * list, uint32_t index,
double value);
260 int (* insert_str)(
as_list * list, uint32_t index,
const char * value);
284 int (* append_int64)(
as_list * list, int64_t value);
294 int (* append_double)(
as_list * list,
double value);
304 int (* append_str)(
as_list * list,
const char * value);
328 int (* prepend_int64)(
as_list * list, int64_t value);
338 int (* prepend_double)(
as_list * list,
double value);
348 int (* prepend_str)(
as_list * list,
const char * value);
365 int (* remove)(
as_list * list, uint32_t index);
453 union as_list_iterator_u * (* iterator_new)(
const as_list * list);
462 union as_list_iterator_u * (* iterator_init)(
const as_list * list,
union as_list_iterator_u * it);
776 return (
struct as_map_s *) (v && v->
type ==
AS_MAP ? v : NULL);
1416 return as_util_hook(
foreach,
false, list, callback, udata);
static as_bytes * as_bytes_fromval(const as_val *v)
static as_double * as_double_fromval(const as_val *value)
static as_integer * as_integer_fromval(const as_val *v)
static int as_list_insert(as_list *list, uint32_t i, as_val *value)
static int as_list_set(as_list *list, uint32_t i, as_val *value)
static int as_list_append(as_list *list, as_val *value)
AS_EXTERN uint32_t as_list_val_hashcode(const as_val *v)
static int as_list_prepend(as_list *list, as_val *value)
AS_EXTERN char * as_list_val_tostring(const as_val *v)
bool(* as_list_foreach_callback)(as_val *value, void *udata)
AS_EXTERN void as_list_val_destroy(as_val *v)
static as_val * as_list_get(const as_list *list, uint32_t i)
static as_string * as_string_fromval(const as_val *v)
#define as_util_hook(hook, default, object,...)
#define as_util_fromval(object, type_id, type)
#define as_val_destroy(__v)
static union as_list_iterator_u * as_list_iterator_new(const as_list *list)
static int as_list_append_str(as_list *list, const char *value)
static int as_list_insert_bytes(as_list *list, uint32_t i, as_bytes *value)
static int as_list_append_string(as_list *list, as_string *value)
static int as_list_insert_map(as_list *list, uint32_t i, struct as_map_s *value)
static int as_list_prepend_bytes(as_list *list, as_bytes *value)
static int64_t as_list_get_int64(const as_list *list, uint32_t i)
static int as_list_insert_integer(as_list *list, uint32_t i, as_integer *value)
static int as_list_insert(as_list *list, uint32_t i, as_val *value)
static int as_list_append_bytes(as_list *list, as_bytes *value)
static bool as_list_foreach(const as_list *list, as_list_foreach_callback callback, void *udata)
static void as_list_destroy(as_list *list)
static int as_list_remove(as_list *list, uint32_t index)
AS_EXTERN as_list * as_list_init(as_list *list, const as_list_hooks *hooks)
static as_list * as_list_drop(const as_list *list, uint32_t n)
static as_val * as_list_toval(as_list *list)
static int as_list_insert_int64(as_list *list, uint32_t i, int64_t value)
static uint32_t as_list_size(const as_list *list)
static struct as_map_s * as_list_get_map(const as_list *list, uint32_t i)
static as_integer * as_list_get_integer(const as_list *list, uint32_t i)
static int as_list_set(as_list *list, uint32_t i, as_val *value)
static int as_list_append_map(as_list *list, struct as_map_s *value)
static int as_list_append(as_list *list, as_val *value)
static int as_list_set_int64(as_list *list, uint32_t i, int64_t value)
static as_list * as_list_tail(const as_list *list)
static int as_list_prepend_str(as_list *list, const char *value)
static int as_list_append_as_double(as_list *list, as_double *value)
static int as_list_prepend_string(as_list *list, as_string *value)
static int as_list_set_integer(as_list *list, uint32_t i, as_integer *value)
static int as_list_prepend_list(as_list *list, as_list *value)
static int as_list_append_int64(as_list *list, int64_t value)
static as_list * as_list_take(const as_list *list, uint32_t n)
static as_list * as_list_get_list(const as_list *list, uint32_t i)
static int as_list_set_map(as_list *list, uint32_t i, struct as_map_s *value)
static int as_list_prepend_int64(as_list *list, int64_t value)
static int as_list_insert_string(as_list *list, uint32_t i, as_string *value)
static int as_list_prepend_integer(as_list *list, as_integer *value)
static as_string * as_list_get_string(const as_list *list, uint32_t i)
static int as_list_prepend_map(as_list *list, struct as_map_s *value)
static int as_list_trim(as_list *list, uint32_t index)
static as_list * as_list_fromval(as_val *v)
static int as_list_set_list(as_list *list, uint32_t i, as_list *value)
static int as_list_insert_as_double(as_list *list, uint32_t i, as_double *value)
static uint32_t as_list_hashcode(as_list *list)
static int as_list_set_bytes(as_list *list, uint32_t i, as_bytes *value)
static int as_list_append_double(as_list *list, double value)
static char * as_list_get_str(const as_list *list, uint32_t i)
static as_double * as_list_get_as_double(const as_list *list, uint32_t i)
static int as_list_set_string(as_list *list, uint32_t i, as_string *value)
static int as_list_prepend_double(as_list *list, double value)
static as_bytes * as_list_get_bytes(const as_list *list, uint32_t i)
static int as_list_insert_double(as_list *list, uint32_t i, double value)
static int as_list_prepend(as_list *list, as_val *value)
static int as_list_insert_str(as_list *list, uint32_t i, const char *value)
static int as_list_prepend_as_double(as_list *list, as_double *value)
AS_EXTERN as_list * as_list_cons(as_list *list, bool free, const as_list_hooks *hooks)
static int as_list_concat(as_list *list, const as_list *list2)
static int as_list_set_double(as_list *list, uint32_t i, double value)
static double as_list_get_double(const as_list *list, uint32_t i)
AS_EXTERN as_list * as_list_new(const as_list_hooks *hooks)
static as_val * as_list_get(const as_list *list, uint32_t i)
static int as_list_insert_list(as_list *list, uint32_t i, as_list *value)
static as_val * as_list_head(const as_list *list)
static int as_list_append_list(as_list *list, as_list *value)
static int as_list_set_str(as_list *list, uint32_t i, const char *value)
static union as_list_iterator_u * as_list_iterator_init(union as_list_iterator_u *it, const as_list *list)
static int as_list_append_integer(as_list *list, as_integer *value)
static int as_list_set_as_double(as_list *list, uint32_t i, as_double *value)
const struct as_list_hooks_s * hooks