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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user