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

Function tir_cstring

src/mcp/test_impact_result_util.c:130–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130bool tir_cstring(tir_context *c, const char *s, tir_bytes *out) {
131 if (!s)
132 return tir_fail(c, CBM_TEST_RESULT_INVALID);
133 size_t length = 0;
134 for (;;) {
135 if (!tir_input_bytes(c, 1) || !tir_step(c, 1, 0))
136 return false;
137 if (!s[length])
138 break;
139 if (length == SIZE_MAX - 1)
140 return tir_fail(c, CBM_TEST_RESULT_LIMIT);
141 length++;
142 }
143 *out = (tir_bytes){(const unsigned char *)s, length};
144 return true;
145}
146
147static bool tir_utf8_tail(tir_context *c, tir_bytes b, size_t *at, unsigned count, uint32_t value,
148 uint32_t minimum) {

Callers 6

tir_labelFunction · 0.85
tir_string_arrayFunction · 0.85
tir_policy_digestFunction · 0.85
tir_read_modelFunction · 0.85
tir_selection_suitesFunction · 0.85
tir_selection_casesFunction · 0.85

Calls 3

tir_failFunction · 0.85
tir_input_bytesFunction · 0.85
tir_stepFunction · 0.85

Tested by

no test coverage detected