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

Function snapshot_input

src/discover/userconfig.c:658–665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

656}
657
658static cbm_userconfig_snapshot_status_t snapshot_input(cbm_userconfig_source_state_t state,
659 const void *bytes, size_t len) {
660 if (state == CBM_USERCONFIG_SOURCE_ABSENT)
661 return (!bytes && len == 0) ? CBM_USERCONFIG_SNAPSHOT_OK : CBM_USERCONFIG_SNAPSHOT_INVALID;
662 if (state != CBM_USERCONFIG_SOURCE_PRESENT || !bytes || len == 0)
663 return CBM_USERCONFIG_SNAPSHOT_INVALID;
664 return len > MAX_CONFIG_SIZE ? CBM_USERCONFIG_SNAPSHOT_LIMIT : CBM_USERCONFIG_SNAPSHOT_OK;
665}
666
667cbm_userconfig_snapshot_status_t cbm_userconfig_from_project_bytes(
668 cbm_userconfig_source_state_t state, const void *bytes, size_t len, cbm_userconfig_t **out) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected