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

Function push_pattern_token

src/pipeline/pass_semantic_edges.c:127–133  ·  view source on GitHub ↗

Append a single token to `tokens` if there's capacity. Consolidates the * `if (count < max_tokens) { tokens[count++] = strdup(...); }` pattern. */

Source from the content-addressed store, hash-verified

125/* Append a single token to `tokens` if there's capacity. Consolidates the
126 * `if (count < max_tokens) { tokens[count++] = strdup(...); }` pattern. */
127static int push_pattern_token(char **tokens, int count, int max_tokens, const char *text) {
128 if (count >= max_tokens) {
129 return count;
130 }
131 tokens[count] = strdup(text);
132 return tokens[count] ? count + SKIP_ONE : count;
133}
134
135/* True if `s` contains any of the space-separated substrings in `needles`. */
136static bool has_any(const char *s, const char *const *needles) {

Callers 4

inject_callee_tokensFunction · 0.85
inject_decorator_tokensFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected