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

@@ -4,6 +4,10 @@
#include <blue/core/btree.h>
#include <blue/core/queue.h>
enum mie_name_map_flags {
MIE_NAME_MAP_STRICT = 0x01u,
};
enum mie_name_map_entry_type {
MIE_NAME_MAP_E_NONE = 0,
MIE_NAME_MAP_E_NAME,
@@ -38,6 +42,7 @@ extern struct mie_name_map *mie_name_map_create(void);
extern void mie_name_map_destroy(struct mie_name_map *map);
extern struct mie_name *mie_name_map_put(
struct mie_name_map *map, struct mie_name *entry, const char *hint);
struct mie_name_map *map, struct mie_name *entry, const char *hint,
enum mie_name_map_flags flags);
#endif