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

Function stack_clear

stack/stack.c:181–188  ·  view source on GitHub ↗

@brief Drop every element; the stack becomes empty. */

Source from the content-addressed store, hash-verified

179
180
181/** @brief Drop every element; the stack becomes empty. */
182void stack_clear(Stack* stk) {
183 STACK_LOG("[stack_clear]: stk=%p", (void*)stk);
184
185 if (!stk || !stk->vec) {
186 return;
187 }
188 vector_clear(stk->vec);
189}
190
191

Callers

nothing calls this directly

Calls 1

vector_clearFunction · 0.85

Tested by

no test coverage detected