Sha256: 26c7b122b8ad19fac77cdaf051b9a9e6788519214199b19c218b91bf16cc6236
Contents?: true
Size: 430 Bytes
Versions: 12
Compression:
Stored size: 430 Bytes
Contents
#include "prism/util/pm_state_stack.h" /** * Pushes a value onto the stack. */ void pm_state_stack_push(pm_state_stack_t *stack, bool value) { *stack = (*stack << 1) | (value & 1); } /** * Pops a value off the stack. */ void pm_state_stack_pop(pm_state_stack_t *stack) { *stack >>= 1; } /** * Returns the value at the top of the stack. */ bool pm_state_stack_p(pm_state_stack_t *stack) { return *stack & 1; }
Version data entries
12 entries across 12 versions & 2 rubygems