MCPcopy Create free account
hub / github.com/IoLanguage/io / Stack_doUntilMark_

Function Stack_doUntilMark_

libs/basekit/source/Stack_inline.h:30–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30IOINLINE 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
45IOINLINE void Stack_clear(Stack *self) {
46 self->top = self->items;

Callers 1

Stack_popMarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected