MCPcopy Create free account
hub / github.com/KaisenAmin/c_std / stack_top

Function stack_top

stack/stack.h:69–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69static inline void* stack_top(const Stack* stk) {
70 if (!stk || !stk->vec || stk->vec->size == 0) {
71 return NULL;
72 }
73 return (char*)stk->vec->items + (stk->vec->size - 1) * stk->vec->itemSize;
74}
75
76
77static inline bool stack_push(Stack* stk, const void* item) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected