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

Function d2_push

internal/cbm/diagram.c:1888–1898  ·  view source on GitHub ↗

One level deeper: into the container `id`, or (no id) into a block that * keeps the path. */

Source from the content-addressed store, hash-verified

1886/* One level deeper: into the container `id`, or (no id) into a block that
1887 * keeps the path. */
1888static void d2_push(d2_scope_t *sc, dg_str_t id) {
1889 if (sc->depth < D2_DEPTH_MAX) {
1890 sc->lens[sc->depth] = strlen(sc->path);
1891 if (id.n) {
1892 char next[D2_PATH_MAX];
1893 snprintf(next, sizeof(next), "%.*s", (int)id.n, id.p);
1894 memcpy(sc->path, next, sizeof(next));
1895 }
1896 }
1897 sc->depth++;
1898}
1899
1900static void d2_pop(d2_scope_t *sc) {
1901 if (sc->depth == 0) {

Callers 2

d2_keyFunction · 0.85
dg_d2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected