|
HTP
0.5
|
Functions | |
| htp_list_t * | htp_list_array_create (size_t size) |
| void | htp_list_array_clear (htp_list_array_t *l) |
| void | htp_list_array_destroy (htp_list_array_t *l) |
| void * | htp_list_array_get (const htp_list_array_t *l, size_t idx) |
| void * | htp_list_array_pop (htp_list_array_t *l) |
| htp_status_t | htp_list_array_push (htp_list_array_t *l, void *e) |
| htp_status_t | htp_list_array_replace (htp_list_array_t *l, size_t idx, void *e) |
| size_t | htp_list_array_size (const htp_list_array_t *l) |
| void * | htp_list_array_shift (htp_list_array_t *l) |
| void htp_list_array_clear | ( | htp_list_array_t * | l | ) |
Remove all elements from the list. It is the responsibility of the caller to iterate over list elements and deallocate them if necessary, prior to invoking this function.
| [in] | l |
| htp_list_t* htp_list_array_create | ( | size_t | size | ) |
Create new array-backed list.
| [in] | size |
| void htp_list_array_destroy | ( | htp_list_array_t * | l | ) |
Free the memory occupied by this list. This function assumes the elements held by the list were freed beforehand.
| [in] | l |
| void* htp_list_array_get | ( | const htp_list_array_t * | l, |
| size_t | idx | ||
| ) |
Find the element at the given index.
| [in] | l | |
| [in] | idx |
| void* htp_list_array_pop | ( | htp_list_array_t * | l | ) |
Remove one element from the end of the list.
| [in] | l |
| htp_status_t htp_list_array_push | ( | htp_list_array_t * | l, |
| void * | e | ||
| ) |
Add new element to the end of the list, expanding the list as necessary.
| [in] | l | |
| [in] | e |
| htp_status_t htp_list_array_replace | ( | htp_list_array_t * | l, |
| size_t | idx, | ||
| void * | e | ||
| ) |
Replace the element at the given index with the provided element.
| [in] | l | |
| [in] | idx | |
| [in] | e |
| void* htp_list_array_shift | ( | htp_list_array_t * | l | ) |
Remove one element from the beginning of the list.
| [in] | l |
| size_t htp_list_array_size | ( | const htp_list_array_t * | l | ) |
Returns the size of the list.
| [in] | l |
1.8.9.1