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

Function stack_size

stack/stack.h:59–61  ·  view source on GitHub ↗

------------------------------------------------------------------ */ Inlined hot ops */ ------------------------------------------------------------------ */ * A stack is LIFO at the back of the vector, so push / top / pop / empty / size * are tiny O(1) operations that dominate any real workload. They are defined * `static inline` here (the Vec

Source from the content-addressed store, hash-verified

57 * inline vector op. Pops adjust the vector's size directly.
58 */
59static inline size_t stack_size(const Stack* stk) {
60 return (stk && stk->vec) ? stk->vec->size : 0;
61}
62
63
64static inline bool stack_empty(const Stack* stk) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected