Dynarr 0.0.1
C dynamic array
Loading...
Searching...
No Matches
Auto-resize

Internals for auto-resize support. More...

Functions

static dynarr_status_t grow (dynarr_t **const dynarr, const size_t amount_to_add)
 
static dynarr_status_t shrink (dynarr_t **const dynarr, const size_t amount_to_remove)
 
static void free_space_at (dynarr_t *const dynarr, const size_t index, const size_t amount)
 
static void make_space_at (dynarr_t *const dynarr, const size_t index, size_t amount)
 

Detailed Description

Internals for auto-resize support.

Function Documentation

◆ grow()

static dynarr_status_t grow ( dynarr_t **const dynarr,
const size_t amount_to_add )
static

Perform a growth operation taking into a count amount of elements we need to add.

Definition at line 563 of file dynarr.c.

Here is the call graph for this function:

◆ shrink()

static dynarr_status_t shrink ( dynarr_t **const dynarr,
const size_t amount_to_remove )
static

Perform a shrinking operation taking into a count amount of elements we need to remove.

Definition at line 586 of file dynarr.c.

Here is the call graph for this function:

◆ free_space_at()

static void free_space_at ( dynarr_t *const dynarr,
const size_t index,
const size_t amount )
static

Shifting elements at index + amount to the left by amount.

Definition at line 612 of file dynarr.c.

Here is the call graph for this function:

◆ make_space_at()

static void make_space_at ( dynarr_t *const dynarr,
const size_t index,
size_t amount )
static

Shifting elements at index by amount. Sufficient space has to be allocated prior to that call.

Definition at line 641 of file dynarr.c.

Here is the call graph for this function: