status-code
status-code copied to clipboard
status_code_domain::string_ref and atomic_refcounted_string_ref have a bad API around zero termination
- The caller is expected to
malloca regionlength + 1and zero terminate it before handing it in. - This is highly prone to mistake and surprise.
- The API should be refactored around what
path_viewdoes i.e. caller must specify zero termination. - I also think caller should not be calling
mallocin the first place, that's an internal implementation detail which should not be exposed. - Also what about on Freestanding where there is no
malloc?