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

Function stack_is_equal

stack/stack.c:230–239  ·  view source on GitHub ↗

@brief true if both stacks hold the same bytes (NULL == NULL). */

Source from the content-addressed store, hash-verified

228
229/** @brief true if both stacks hold the same bytes (NULL == NULL). */
230bool stack_is_equal(const Stack* stk1, const Stack* stk2) {
231 if (stk1 == stk2) {
232 return true;
233 }
234 if (!stk1 || !stk2 || !stk1->vec || !stk2->vec) {
235 return false;
236 }
237
238 return vector_is_equal(stk1->vec, stk2->vec);
239}
240
241
242/** @brief Inverse of stack_is_equal. */

Callers 3

stack_is_not_equalFunction · 0.85
stack_is_less_or_equalFunction · 0.85

Calls 1

vector_is_equalFunction · 0.85

Tested by

no test coverage detected