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

Function lookup_string_constant

internal/cbm/extract_calls.c:35–46  ·  view source on GitHub ↗

Look up a module-level string constant by name. URL-builder entries share the * map but are not constants: a bare `thingPath` reference is the function, not * the URL it would build (issue #1009). */

Source from the content-addressed store, hash-verified

33 * map but are not constants: a bare `thingPath` reference is the function, not
34 * the URL it would build (issue #1009). */
35static const char *lookup_string_constant(const CBMExtractCtx *ctx, const char *name) {
36 if (!name || !name[0]) {
37 return NULL;
38 }
39 const CBMStringConstantMap *map = &ctx->string_constants;
40 for (int i = 0; i < map->count; i++) {
41 if (!map->is_url_builder[i] && strcmp(map->names[i], name) == 0) {
42 return map->values[i];
43 }
44 }
45 return NULL;
46}
47
48static const char *lookup_url_builder(const CBMExtractCtx *ctx, const char *name) {
49 if (!name || !name[0]) {

Callers 4

process_keyword_argFunction · 0.85
extract_call_argsFunction · 0.85
extract_string_valueFunction · 0.85
extract_positional_urlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected