Add collision-safe status code registry

Replace the consumer-sized status-name array with private sparse storage and accept arbitrary integer status values. Add explicit range reservations with overlap diagnostics, reserve the library's 0-255 compatibility band, and harden pointer and string boundary handling.

Update regression coverage and document the required migration for custom status-code consumers.
This commit is contained in:
2026-07-30 13:53:39 -04:00
parent 0bb3a4d52c
commit 11d21068df
9 changed files with 250 additions and 260 deletions

View File

@@ -125,11 +125,6 @@ foreach(_test IN LISTS AKERR_TESTS)
add_test(NAME ${_test} COMMAND test_${_test})
endforeach()
# err_maxval parses the generated header to check AKERR_MAX_ERR_VALUE covers
# every AKERR_* code, so it needs the path to the header it was built against.
target_compile_definitions(test_err_maxval PRIVATE
AKERR_GENERATED_HEADER="${GENERATED_AKERROR_H}")
set_tests_properties(
${AKERR_WILL_FAIL_TESTS}
PROPERTIES WILL_FAIL TRUE