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

Function gc_const_value

src/pipeline/pass_operator.c:1504–1514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1502}
1503
1504static void gc_const_value(const gc_scope_t *sc, const char *dir, const char *name, int depth,
1505 gc_val_t *out) {
1506 CBMHashTable *t = gc_consts(sc->g, dir);
1507 const char *expr = t ? cbm_ht_get(t, name) : NULL;
1508 if (!expr) {
1509 out->known = false;
1510 return;
1511 }
1512 gc_scope_t inner = {sc->g, sc->text, dir, NULL, NULL, NULL, NULL};
1513 gc_eval(&inner, expr, strlen(expr), depth + SKIP_ONE, out);
1514}
1515
1516static void gc_eval(const gc_scope_t *sc, const char *s, size_t n, int depth, gc_val_t *out) {
1517 *out = (gc_val_t){.known = false};

Callers 1

gc_evalFunction · 0.85

Calls 3

gc_constsFunction · 0.85
cbm_ht_getFunction · 0.85
gc_evalFunction · 0.85

Tested by

no test coverage detected