summaryrefslogtreecommitdiff
path: root/src/runtime/c/gu/map.h
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@gmail.com>2013-08-19 12:13:47 +0000
committerkr.angelov <kr.angelov@gmail.com>2013-08-19 12:13:47 +0000
commit308e1445ca5396327d9e78d68cc45e8e008a4876 (patch)
tree15a6532f1e16279f562d44bc93241b9313780d5c /src/runtime/c/gu/map.h
parent87e34b11dc9cb7a09734f18326c2e4b1dc7560b1 (diff)
added GuEnum interface for iterating over maps in the C runtime
Diffstat (limited to 'src/runtime/c/gu/map.h')
-rw-r--r--src/runtime/c/gu/map.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/runtime/c/gu/map.h b/src/runtime/c/gu/map.h
index 327d6ea6a..33edc2a00 100644
--- a/src/runtime/c/gu/map.h
+++ b/src/runtime/c/gu/map.h
@@ -4,8 +4,9 @@
#include <gu/hash.h>
#include <gu/mem.h>
#include <gu/exn.h>
+#include <gu/enum.h>
-typedef const struct GuMapItor GuMapItor;
+typedef struct GuMapItor GuMapItor;
struct GuMapItor {
void (*fn)(GuMapItor* self, const void* key, void* value,
@@ -67,6 +68,13 @@ gu_map_insert(GuMap* ht, const void* key);
void
gu_map_iter(GuMap* ht, GuMapItor* itor, GuExn* err);
+typedef struct {
+ const void* key;
+ void* value;
+} GuMapKeyValue;
+
+GuEnum*
+gu_map_enum(GuMap* ht, GuPool* pool);
typedef GuMap GuIntMap;