diff options
| author | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:00:44 +0300 |
|---|---|---|
| committer | Kirill Petrashin <kirill8201@yandex.ru> | 2026-05-03 21:00:44 +0300 |
| commit | d9d29ab80ddc33e864bf9caf36db524bbd3a0d25 (patch) | |
| tree | 26c635b7bde4a47bdebb4edb3486b5050c34c549 /stack.h | |
| parent | 1729beeae70832ef89f8077eff5a225ba51e337b (diff) | |
| download | astar-d9d29ab80ddc33e864bf9caf36db524bbd3a0d25.tar.xz | |
Fix return type for ps_push()
Diffstat (limited to 'stack.h')
| -rw-r--r-- | stack.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -10,12 +10,13 @@ struct PositionStack_s { Position *arr; /* The array with all the values */ size_t capacity; - size_t top; /* Shows where the top of the stack is */ + size_t top; /* Shows where the top of the stack is. + * Points to the empty spot after the last element */ }; typedef struct PositionStack_s PositionStack; PositionStack ps_new(void); /* Returns an empty position stack */ -int ps_push(PositionStack *ps, Position pos); /* Returns -1 if failed to realloc() */ +void ps_push(PositionStack *ps, Position pos); /* Returns -1 if failed to realloc() */ Position ps_pop(PositionStack *ps); Position ps_peek(PositionStack ps); void ps_free(PositionStack ps); |
