|
json-c 0.18
|
Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use. More...
Data Structures | |
| struct | array_list |
Macros | |
| #define | ARRAY_LIST_DEFAULT_SIZE 32 |
Typedefs | |
| typedef void | array_list_free_fn(void *data) |
| typedef struct array_list | array_list |
Functions | |
| struct array_list * | array_list_new (array_list_free_fn *free_fn) |
| struct array_list * | array_list_new2 (array_list_free_fn *free_fn, int initial_size) |
| void | array_list_free (struct array_list *al) |
| void * | array_list_get_idx (struct array_list *al, size_t i) |
| int | array_list_insert_idx (struct array_list *al, size_t i, void *data) |
| int | array_list_put_idx (struct array_list *al, size_t i, void *data) |
| int | array_list_add (struct array_list *al, void *data) |
| size_t | array_list_length (struct array_list *al) |
| void | array_list_sort (struct array_list *arr, int(*compar)(const void *, const void *)) |
| void * | array_list_bsearch (const void **key, struct array_list *arr, int(*compar)(const void *, const void *)) |
| int | array_list_del_idx (struct array_list *arr, size_t idx, size_t count) |
| int | array_list_shrink (struct array_list *arr, size_t empty_slots) |
Internal methods for working with json_type_array objects. Although this is exposed by the json_object_get_array() method, it is not recommended for direct use.
| #define ARRAY_LIST_DEFAULT_SIZE 32 |
| typedef struct array_list array_list |
| typedef void array_list_free_fn(void *data) |
|
extern |
References array_list_add().
Referenced by array_list_add().
|
extern |
References array_list_bsearch().
Referenced by array_list_bsearch().
|
extern |
References array_list_del_idx().
Referenced by array_list_del_idx().
|
extern |
References array_list_free().
Referenced by array_list_free().
|
extern |
References array_list_get_idx().
Referenced by array_list_get_idx().
|
extern |
References array_list_insert_idx().
Referenced by array_list_insert_idx().
|
extern |
References array_list_length().
Referenced by array_list_length().
|
extern |
Allocate an array_list of the default size (32).
References array_list_new().
Referenced by array_list_new().
|
extern |
Allocate an array_list of the desired size.
If possible, the size should be chosen to closely match the actual number of elements expected to be used. If the exact size is unknown, there are tradeoffs to be made:
References array_list_new2().
Referenced by array_list_new2().
|
extern |
References array_list_put_idx().
Referenced by array_list_put_idx().
|
extern |
Shrink the array list to just enough to fit the number of elements in it, plus empty_slots.
References array_list_shrink().
Referenced by array_list_shrink().
|
extern |
References array_list_sort().
Referenced by array_list_sort().