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

Function cbm_scope_update_callable

internal/cbm/lsp/scope.c:139–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139bool cbm_scope_update_callable(CBMScope *scope, const char *name, const char *callable_qn) {
140 if (!name) {
141 return false;
142 }
143 for (CBMScope *s = scope; s != NULL; s = s->parent) {
144 for (CBMScopeChunk *c = s->chunks; c != NULL; c = c->next) {
145 for (int i = 0; i < c->used; i++) {
146 if (c->bindings[i].name && strcmp(c->bindings[i].name, name) == 0) {
147 c->bindings[i].callable_qn = callable_qn;
148 return true;
149 }
150 }
151 }
152 }
153 return false;
154}

Calls

no outgoing calls

Tested by

no test coverage detected