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

Function runtime_bounded_length

src/daemon/runtime.c:304–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304static bool runtime_bounded_length(const char *value, size_t capacity, size_t *length_out) {
305 if (!value || capacity == 0) {
306 return false;
307 }
308 for (size_t i = 0; i < capacity; i++) {
309 if (value[i] == '\0') {
310 if (length_out) {
311 *length_out = i;
312 }
313 return true;
314 }
315 }
316 return false;
317}
318
319static bool runtime_wire_string_encode(uint8_t *out, size_t capacity, const char *value,
320 bool allow_empty) {

Calls

no outgoing calls

Tested by

no test coverage detected