Subastra
Loading...
Searching...
No Matches
Static Public Member Functions | Data Fields
list_t Struct Reference

#include <list.h>

Collaboration diagram for list_t:
Collaboration graph
[legend]

Static Public Member Functions

static bool list_pop_tail (list_t *ls, void *out)
 Removes the last index in the list. Returns true if the element was removed and false if the list was empty.
 
static void list_remove (list_t *ls, sz idx)
 Removes an element at index idx. Panics if the index is out of range.
 

Data Fields

allocator_t _alloc
 
sz _entry
 
sz _capacity
 
sz size
 
voiddata
 

Member Function Documentation

◆ list_pop_tail()

static bool list_pop_tail ( list_t ls,
void out 
)
static

Removes the last index in the list. Returns true if the element was removed and false if the list was empty.

Parameters
[out]outThe place for the value at the tail to be written to. Ignored if NULL.

◆ list_remove()

static void list_remove ( list_t ls,
sz  idx 
)
static

Removes an element at index idx. Panics if the index is out of range.

Field Documentation

◆ _alloc

allocator_t _alloc

◆ _capacity

sz _capacity

◆ _entry

sz _entry

◆ data

void* data

◆ size

sz size