From 2f2ddc1f2dbca56c874e8f9c31b5b963202d80e7 Mon Sep 17 00:00:00 2001 From: Eric Haszlakiewicz Date: Thu, 14 Apr 2022 01:12:43 +0000 Subject: Generate docs for the 0.16 release --- doc/html/arraylist_8h.html | 449 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 449 insertions(+) create mode 100644 doc/html/arraylist_8h.html (limited to 'doc/html/arraylist_8h.html') diff --git a/doc/html/arraylist_8h.html b/doc/html/arraylist_8h.html new file mode 100644 index 0000000..139f2ec --- /dev/null +++ b/doc/html/arraylist_8h.html @@ -0,0 +1,449 @@ + + + + + +json-c: arraylist.h File Reference + + + + + + +
+
+ + + + + + +
+
json-c +  0.16 +
+
+
+ + + + +
+
+ +
+
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)
 
struct array_listarray_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_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)
 
+

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

+ +
+
+ + + + +
#define ARRAY_LIST_DEFAULT_SIZE   32
+
+ +
+
+

Typedef Documentation

+ +
+
+ + + + +
typedef struct array_list array_list
+
+ +
+
+ +
+
+ + + + +
typedef void( array_list_free_fn)(void *data)
+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + + + + + + + + + + +
int array_list_add (struct array_listal,
void * data 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void* array_list_bsearch (const void ** key,
struct array_listarr,
int(*)(const void *, const void *) compar 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int array_list_del_idx (struct array_listarr,
size_t idx,
size_t count 
)
+
+ +
+
+ +
+
+ + + + + + + + +
void array_list_free (struct array_listal)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void* array_list_get_idx (struct array_listal,
size_t i 
)
+
+ +
+
+ +
+
+ + + + + + + + +
size_t array_list_length (struct array_listal)
+
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + +
struct array_list* array_list_new (array_list_free_fnfree_fn)
+
+read
+
+

Allocate an array_list of the default size (32).

+
Deprecated:
Use array_list_new2() instead.
+ +
+
+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
struct array_list* array_list_new2 (array_list_free_fnfree_fn,
int initial_size 
)
+
+read
+
+

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:

+
    +
  • too small - the array_list code will need to call realloc() more often (which might incur an additional memory copy).
  • +
  • too large - will waste memory, but that can be mitigated by calling array_list_shrink() once the final size is known.
  • +
+
See Also
array_list_shrink
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
int array_list_put_idx (struct array_listal,
size_t i,
void * data 
)
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
int array_list_shrink (struct array_listarr,
size_t empty_slots 
)
+
+

Shrink the array list to just enough to fit the number of elements in it, plus empty_slots.

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
void array_list_sort (struct array_listarr,
int(*)(const void *, const void *) compar 
)
+
+ +
+
+
+ + + + -- cgit v1.2.1