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

Function py_facts_owned

tests/test_extraction.c:11754–11770  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11752}
11753
11754static bool py_facts_owned(const CBMArena *arena, const CBMPyNamespaceFacts *facts) {
11755 if (!py_facts_owned_range(arena, facts->items, (size_t)facts->count * sizeof(*facts->items)))
11756 return false;
11757 for (int i = 0; i < facts->count; i++) {
11758 const CBMPyNamespaceFact *f = &facts->items[i];
11759 if (!py_facts_owned_string(arena, f->local_name) ||
11760 !py_facts_owned_string(arena, f->module_name) ||
11761 !py_facts_owned_string(arena, f->member_name) ||
11762 !py_facts_owned_range(arena, f->names, (size_t)f->name_count * sizeof(*f->names)))
11763 return false;
11764 for (int j = 0; j < f->name_count; j++) {
11765 if (!py_facts_owned_string(arena, f->names[j]))
11766 return false;
11767 }
11768 }
11769 return true;
11770}
11771
11772static const char PY_FACTS_ORDERED[] = "def item():\n return 1\n"
11773 "from first import item\n"

Callers 1

test_extraction.cFile · 0.85

Calls 2

py_facts_owned_rangeFunction · 0.85
py_facts_owned_stringFunction · 0.85

Tested by

no test coverage detected