diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/advanced.c | 4 | ||||
| -rw-r--r-- | examples/complex.c | 2 | ||||
| -rw-r--r-- | examples/inits.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/advanced.c b/examples/advanced.c index f5a31587..753bba1e 100644 --- a/examples/advanced.c +++ b/examples/advanced.c @@ -38,8 +38,8 @@ static inline VikingRaw viking_toRaw(Viking* vk) { // With this in place, we use the full using_cmap() macro to define {Viking -> int} hash map type: -using_cmap(vk, Viking, int, c_default_del, c_default_clone, - vikingraw_equals, vikingraw_hash, +using_cmap(vk, Viking, int, vikingraw_equals, vikingraw_hash, + c_default_del, c_default_clone, viking_del, viking_fromRaw, viking_toRaw, VikingRaw); int main() diff --git a/examples/complex.c b/examples/complex.c index 16aa75b7..1346007a 100644 --- a/examples/complex.c +++ b/examples/complex.c @@ -7,7 +7,7 @@ void check_del(float* v) {printf("destroy %g\n", *v);} using_carray(f, float, check_del, c_default_clone); // normally omit the last 2 arguments - float type need no destroy.
using_clist(a, carray2f, c_no_compare, carray2f_del, carray2f_clone);
-using_cmap(l, int, clist_a, clist_a_del, clist_a_clone);
+using_cmap(l, int, clist_a, c_default_equals, c_default_hash, clist_a_del, clist_a_clone);
using_cmap_strkey(s, cmap_l, cmap_l_del, cmap_l_clone);
int main() {
diff --git a/examples/inits.c b/examples/inits.c index 320e5b9a..1ef722ea 100644 --- a/examples/inits.c +++ b/examples/inits.c @@ -5,7 +5,7 @@ #include <stc/cpque.h>
#include <stc/clist.h>
-using_cmap(id, int, cstr, cstr_del, cstr_clone); // Map of int -> cstr
+using_cmap(id, int, cstr, c_default_equals, c_default_hash, cstr_del, cstr_clone); // Map of int -> cstr
using_cmap_strkey(cnt, int);
typedef struct {int x, y;} ipair_t;
|
