json-c  0.13
Data Structures | Macros | Typedefs | Functions
arraylist.h File Reference

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_listarray_list_new (array_list_free_fn *free_fn)
 
void array_list_free (struct array_list *al)
 
void * array_list_get_idx (struct array_list *al, size_t i)
 
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(*sort_fn)(const void *, const void *))
 
int array_list_del_idx (struct array_list *arr, size_t idx, size_t count)
 

Detailed Description

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.

Macro Definition Documentation

◆ ARRAY_LIST_DEFAULT_SIZE

#define ARRAY_LIST_DEFAULT_SIZE   32

Typedef Documentation

◆ array_list

typedef struct array_list array_list

◆ array_list_free_fn

typedef void() array_list_free_fn(void *data)

Function Documentation

◆ array_list_add()

int array_list_add ( struct array_list al,
void *  data 
)

◆ array_list_bsearch()

void* array_list_bsearch ( const void **  key,
struct array_list arr,
int(*)(const void *, const void *)  sort_fn 
)

◆ array_list_del_idx()

int array_list_del_idx ( struct array_list arr,
size_t  idx,
size_t  count 
)

◆ array_list_free()

void array_list_free ( struct array_list al)

◆ array_list_get_idx()

void* array_list_get_idx ( struct array_list al,
size_t  i 
)

◆ array_list_length()

size_t array_list_length ( struct array_list al)

◆ array_list_new()

struct array_list* array_list_new ( array_list_free_fn free_fn)

◆ array_list_put_idx()

int array_list_put_idx ( struct array_list al,
size_t  i,
void *  data 
)

◆ array_list_sort()

void array_list_sort ( struct array_list arr,
int(*)(const void *, const void *)  compar 
)