ruby/yarp/util/yp_state_stack.h
Jemma Issroff cc7f765f2c [Feature #19741] Sync all files in yarp
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:

* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp
2023-06-21 11:25:39 -07:00

24 lines
586 B
C

#ifndef YP_STATE_STACK_H
#define YP_STATE_STACK_H
#include "yarp/defines.h"
#include <stdbool.h>
#include <stdint.h>
// A struct that represents a stack of bools.
typedef uint32_t yp_state_stack_t;
// Initializes the state stack to an empty stack.
void yp_state_stack_init(yp_state_stack_t *stack);
// Pushes a value onto the stack.
void yp_state_stack_push(yp_state_stack_t *stack, bool value);
// Pops a value off the stack.
void yp_state_stack_pop(yp_state_stack_t *stack);
// Returns the value at the top of the stack.
bool yp_state_stack_p(yp_state_stack_t *stack);
#endif