Ruby 3.3.0p0 (2023-12-25 revision 5124f9ac7513eb590c37717337c430cb93caa151)
Typedefs | Functions
pm_state_stack.h File Reference

A stack of boolean values. More...

#include "prism/defines.h"
#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef uint32_t pm_state_stack_t
 A struct that represents a stack of boolean values.
 

Functions

void pm_state_stack_push (pm_state_stack_t *stack, bool value)
 Pushes a value onto the stack.
 
void pm_state_stack_pop (pm_state_stack_t *stack)
 Pops a value off the stack.
 
bool pm_state_stack_p (pm_state_stack_t *stack)
 Returns the value at the top of the stack.
 

Detailed Description

A stack of boolean values.

Definition in file pm_state_stack.h.

Typedef Documentation

◆ pm_state_stack_t

typedef uint32_t pm_state_stack_t

A struct that represents a stack of boolean values.

Definition at line 17 of file pm_state_stack.h.

Function Documentation

◆ pm_state_stack_p()

bool pm_state_stack_p ( pm_state_stack_t * stack)

Returns the value at the top of the stack.

Parameters
stackThe stack to get the value from.
Returns
The value at the top of the stack.

Definition at line 23 of file pm_state_stack.c.

◆ pm_state_stack_pop()

void pm_state_stack_pop ( pm_state_stack_t * stack)

Pops a value off the stack.

Parameters
stackThe stack to pop the value off of.

Definition at line 15 of file pm_state_stack.c.

◆ pm_state_stack_push()

void pm_state_stack_push ( pm_state_stack_t * stack,
bool value )

Pushes a value onto the stack.

Parameters
stackThe stack to push the value onto.
valueThe value to push onto the stack.

Definition at line 7 of file pm_state_stack.c.