diff options
| author | Tyge Løvset <[email protected]> | 2021-01-19 12:50:02 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-01-19 12:50:02 +0100 |
| commit | 60132bb5653cf5bd5cf5c0c331bf827456097af5 (patch) | |
| tree | d9c3212a9214ab7fd6549a48505dc270e6595e0a /examples | |
| parent | 7fa5cd3a4092991268276259fa07fda2bb12cfc1 (diff) | |
| download | STC-modified-60132bb5653cf5bd5cf5c0c331bf827456097af5.tar.gz STC-modified-60132bb5653cf5bd5cf5c0c331bf827456097af5.zip | |
Changed template args sequence in cmap.
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;
|
