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

Function using_step

src/pipeline/doc_links_cs.c:4916–4932  ·  view source on GitHub ↗

What the directives of this scope level give the query: the region's own * (`us`, when asked) and, at the global namespace, the unit's. Asked once per * key when the context has a memo. */

Source from the content-addressed store, hash-verified

4914 * (`us`, when asked) and, at the global namespace, the unit's. Asked once per
4915 * key when the context has a memo. */
4916static void using_step(const cs_ctx_t *c, int region, const cs_using_t *us, int nus,
4917 const cs_using_index_t *usi, const cs_unit_t *unit, const cs_query_t *q,
4918 cs_found_t *step) {
4919 char key[CS_MEMO_KEY];
4920 bool keyed = c->memo && !c->memo->off &&
4921 memo_key(key, sizeof(key), c, region, unit ? c->unit : CS_NONE, q);
4922 if (keyed && memo_get(c->memo, key, step)) {
4923 return;
4924 }
4925 level_usings(c, us, nus, usi, q, step, NULL);
4926 if (unit && !found_decided(step)) {
4927 unit_usings(c, unit, q, step);
4928 }
4929 if (keyed) {
4930 memo_put(c->memo, key, step);
4931 }
4932}
4933
4934/* True when the lookup is settled by what the last level added. A level that
4935 * had only invisible candidates does not bind: the lookup goes on, and

Callers 1

lookupFunction · 0.85

Calls 6

memo_keyFunction · 0.85
memo_getFunction · 0.85
level_usingsFunction · 0.85
found_decidedFunction · 0.85
unit_usingsFunction · 0.85
memo_putFunction · 0.85

Tested by

no test coverage detected