Small, Fast S-Expression Library
Data Fields
stack_wrapper Struct Reference

#include <faststack.h>

Data Fields

stack_lvl_ttop
 
stack_lvl_tbottom
 
int height
 

Detailed Description

Wrapper around the stack levels - keeps a pointer to the current top and bottom of the stack and a count of the current height. This allows the top to have non-null above pointer resulting from previously allocated stack levels that may be recycled later without malloc overhead.

Field Documentation

◆ bottom

stack_lvl_t* bottom

The bottom of the stack. If this is NULL, the stack is empty.

◆ height

int height

The current height of the stack, in terms of allocated and used levels.

◆ top

The top of the stack. If this is NULL, the stack is empty.