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

Function runtime_wire_string_encode

src/daemon/runtime.c:426–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424}
425
426static bool runtime_wire_string_encode(uint8_t *out, size_t capacity, const char *value,
427 bool allow_empty) {
428 size_t length = 0;
429 if (!out || !runtime_bounded_length(value, capacity, &length) ||
430 (!allow_empty && length == 0)) {
431 return false;
432 }
433 memset(out, 0, capacity);
434 memcpy(out, value, length);
435 return true;
436}
437
438static bool runtime_wire_string_decode(const uint8_t *in, size_t capacity, char *out,
439 bool allow_empty) {

Calls 1

runtime_bounded_lengthFunction · 0.85

Tested by

no test coverage detected