mie: add strict-naming support to mie_name_map

in strict mode, the hint is taken as the required name. if a value already
exists with the given name, the operation fails.
This commit is contained in:
2025-04-22 15:21:30 +01:00
parent f8c322ef6c
commit 4ffe445572
4 changed files with 17 additions and 4 deletions

View File

@@ -106,7 +106,8 @@ enum b_status mie_module_put_data(
struct mie_value *mie_module_generate_value_name(
struct mie_module *mod, struct mie_value *val, const char *hint)
{
struct mie_name *name = mie_name_map_put(mod->m_names, &val->v_name, hint);
struct mie_name *name
= mie_name_map_put(mod->m_names, &val->v_name, hint, 0);
return b_unbox(struct mie_value, name, v_name);
}