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

Function adr_push_relation

internal/cbm/doc_adr.c:975–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

973}
974
975static void adr_push_relation(adr_doc_t *d, const char *adr_qn, const char *raw, size_t n,
976 uint32_t line, uint16_t syntax) {
977 CBMArena *a = d->ctx->arena;
978 char *text = cbm_arena_strndup(a, raw, n);
979 if (!text) {
980 d->ctx->result->doc_links.failed = true;
981 return;
982 }
983 CBMDocLink link = {.source_qn = adr_qn,
984 .raw = text,
985 .line = line,
986 .def_line = SKIP_ONE,
987 .syntax = syntax,
988 .flags = 0};
989 cbm_doclinks_push(&d->ctx->result->doc_links, a, link);
990}
991
992/* The targets after a relation phrase, up to the end of its sentence: link
993 * destinations and ADR ids. Forward relations become tokens of family

Callers 1

adr_targetsFunction · 0.85

Calls 2

cbm_doclinks_pushFunction · 0.85
cbm_arena_strndupFunction · 0.70

Tested by

no test coverage detected