a more reasonable API to iterate over a map

This commit is contained in:
krangelov
2019-08-30 08:12:15 +02:00
parent 394d033d19
commit 72cfc1f48a
2 changed files with 16 additions and 42 deletions

View File

@@ -74,13 +74,8 @@ gu_map_delete(GuMap* ht, const void* key);
GU_API_DECL void
gu_map_iter(GuMap* ht, GuMapItor* itor, GuExn* err);
typedef struct {
const void* key;
void* value;
} GuMapKeyValue;
GU_API_DECL GuEnum*
gu_map_enum(GuMap* ht, GuPool* pool);
GU_API bool
gu_map_next(GuMap* ht, size_t i, const void** pkey, void** pvalue);
typedef GuMap GuIntMap;