MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / py_facts_equal

Function py_facts_equal

tests/test_extraction.c:11714–11734  ·  view source on GitHub ↗

Python namespace facts: provenance is ordered, content-only and independently * owned. These tests do not enable any reexport resolution. */

Source from the content-addressed store, hash-verified

11712/* Python namespace facts: provenance is ordered, content-only and independently
11713 * owned. These tests do not enable any reexport resolution. */
11714static bool py_facts_equal(const CBMPyNamespaceFacts *a, const CBMPyNamespaceFacts *b) {
11715 if (!cbm_py_namespace_facts_valid(a) || !cbm_py_namespace_facts_valid(b) ||
11716 a->version != b->version || a->language != b->language || a->status != b->status ||
11717 a->failure != b->failure || a->count != b->count)
11718 return false;
11719 for (int i = 0; i < a->count; i++) {
11720 const CBMPyNamespaceFact *x = &a->items[i], *y = &b->items[i];
11721 if (x->kind != y->kind || x->def_kind != y->def_kind ||
11722 x->sequence_kind != y->sequence_kind || x->reason != y->reason ||
11723 x->flags != y->flags || x->relative_level != y->relative_level ||
11724 x->name_count != y->name_count || !cmp_str_eq(x->local_name, y->local_name) ||
11725 !cmp_str_eq(x->module_name, y->module_name) ||
11726 !cmp_str_eq(x->member_name, y->member_name))
11727 return false;
11728 for (int j = 0; j < x->name_count; j++) {
11729 if (!cmp_str_eq(x->names[j], y->names[j]))
11730 return false;
11731 }
11732 }
11733 return true;
11734}
11735
11736static bool py_facts_owned_range(const CBMArena *arena, const void *ptr, size_t bytes) {
11737 if (!ptr)

Callers 1

test_extraction.cFile · 0.85

Calls 2

cmp_str_eqFunction · 0.85

Tested by

no test coverage detected