aboutsummaryrefslogtreecommitdiff
path: root/example_hashmap/new/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'example_hashmap/new/main.c')
-rw-r--r--example_hashmap/new/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/example_hashmap/new/main.c b/example_hashmap/new/main.c
index 4846ab5..db575c6 100644
--- a/example_hashmap/new/main.c
+++ b/example_hashmap/new/main.c
@@ -1,6 +1,9 @@
#include <assert.h>
#include <stdio.h>
+/* provide generic any that matches anything/everything */
+typedef any {}
+
#include "map.h"
#define foreach(name, i, s) \
@@ -9,7 +12,7 @@
/* int wrapper, provides cmp/hash for a generic integer type
* (here a trait like is_integer would be ideal but oh well) */
typedef intw[any I]() {
- typedef I <>;
+ typedef <I> <>;
size_t <>_hash(<> *a)
{