Skip to content

Commit

Permalink
Changed stack_t to postfix_stack_t to avoid namespace conflict on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob McMullen committed Aug 28, 2018
1 parent cb807ba commit 96fd91d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libdebugger/libdebugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ typedef struct {
uint16_t stack[TOKENS_PER_BREAKPOINT];
int index;
int error;
} stack_t;
} postfix_stack_t;

void clear(stack_t *s) {
void clear(postfix_stack_t *s) {
s->index = 0;
s->error = 0;
}

void push(stack_t *s, uint16_t value) {
void push(postfix_stack_t *s, uint16_t value) {
if (s->index >= TOKENS_PER_BREAKPOINT) {
s->error = STACK_OVERFLOW;
}
Expand All @@ -41,7 +41,7 @@ void push(stack_t *s, uint16_t value) {
#endif
}

uint16_t pop(stack_t *s) {
uint16_t pop(postfix_stack_t *s) {
uint16_t value;

if (s->index > 0) {
Expand All @@ -61,7 +61,7 @@ uint16_t pop(stack_t *s) {
return value;
}

void process_binary(uint16_t token, stack_t *s) {
void process_binary(uint16_t token, postfix_stack_t *s) {
uint16_t first, second, value;

first = pop(s);
Expand Down Expand Up @@ -96,15 +96,15 @@ void process_binary(uint16_t token, stack_t *s) {
}
}

int process_unary(uint16_t token, cpu_state_callback_ptr get_emulator_value, stack_t *s) {
int process_unary(uint16_t token, cpu_state_callback_ptr get_emulator_value, postfix_stack_t *s) {
return 0;
}

/* returns: index number of breakpoint or -1 if no breakpoint condition met. */
int libdebugger_check_breakpoints(breakpoints_t *breakpoints, int cycles, cpu_state_callback_ptr get_emulator_value) {
uint16_t token, addr, value;
int i, num_entries, index, status, final_value, count;
stack_t stack;
postfix_stack_t stack;

num_entries = breakpoints->num_breakpoints;

Expand Down

0 comments on commit 96fd91d

Please sign in to comment.