| 28 | } |
| 29 | |
| 30 | IOINLINE void Stack_doUntilMark_(const Stack *self, StackDoCallback *callback) { |
| 31 | void **itemP = self->top; |
| 32 | intptr_t mark = self->lastMark; |
| 33 | |
| 34 | while (itemP > self->items) { |
| 35 | if (itemP - self->items == mark) { |
| 36 | return; |
| 37 | } else { |
| 38 | (*callback)(*itemP); |
| 39 | } |
| 40 | |
| 41 | itemP--; |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | IOINLINE void Stack_clear(Stack *self) { |
| 46 | self->top = self->items; |