solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
Loading...
Searching...
No Matches
Public Attributes | List of all members
dynarray_t Struct Reference

#include <dynarray.h>

Public Attributes

void * data
 
size_t size
 
size_t capacity
 
size_t element_size
 

Detailed Description

Dynamic array structure. Grows automatically on push, shrinks on explicit request or when usage drops below threshold. Thread-unsafe: caller must synchronize concurrent access.

Definition at line 32 of file dynarray.h.

Member Data Documentation

◆ capacity

size_t dynarray_t::capacity

Current capacity (number of elements that can be stored without reallocation).

Definition at line 38 of file dynarray.h.

Referenced by dynarray_pop(), dynarray_push(), and dynarray_reserve().

◆ data

void* dynarray_t::data

Pointer to the data buffer.

Definition at line 34 of file dynarray.h.

Referenced by dynarray_free(), dynarray_get(), dynarray_init(), dynarray_pop(), dynarray_push(), dynarray_reserve(), and dynarray_set().

◆ element_size

size_t dynarray_t::element_size

Size of each element in bytes.

Definition at line 40 of file dynarray.h.

Referenced by dynarray_get(), dynarray_pop(), dynarray_push(), dynarray_reserve(), and dynarray_set().

◆ size

size_t dynarray_t::size

Number of elements currently in the array.

Definition at line 36 of file dynarray.h.

Referenced by dynarray_clear(), dynarray_get(), dynarray_pop(), dynarray_push(), dynarray_reserve(), dynarray_set(), and dynarray_shrink_to_fit().


The documentation for this struct was generated from the following file: