summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-20 18:55:01 +0200
committerTyge Løvset <[email protected]>2022-10-20 18:55:01 +0200
commitb40ca18d43d31f997f64de6168ada58c7dfad9b9 (patch)
treed9fc575becaa8ad3d401058adb011818842fb50e /examples
parent14f67d1936fa76be436eaaee739861268ca534f7 (diff)
downloadSTC-modified-b40ca18d43d31f997f64de6168ada58c7dfad9b9.tar.gz
STC-modified-b40ca18d43d31f997f64de6168ada58c7dfad9b9.zip
Fixed some inconsistencies, and a minor bug in cmap.
Diffstat (limited to 'examples')
-rw-r--r--examples/arc_containers.c2
-rw-r--r--examples/music_arc.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/examples/arc_containers.c b/examples/arc_containers.c
index c4c68bcf..6e6f748f 100644
--- a/examples/arc_containers.c
+++ b/examples/arc_containers.c
@@ -9,7 +9,7 @@
#include <stc/csmap.h>
#define i_type Arc // (atomic) ref. counted type
-#define i_val_class Map
+#define i_val Map
#define i_valdrop(p) (printf("drop Arc:\n"), Map_drop(p))
// no need for atomic ref. count in single thread:
#define i_opt c_no_atomic
diff --git a/examples/music_arc.c b/examples/music_arc.c
index 616114fc..0fb0dd70 100644
--- a/examples/music_arc.c
+++ b/examples/music_arc.c
@@ -21,9 +21,8 @@ void Song_drop(Song* s) {
// Define the reference counted type
#define i_type SongArc
-#define i_val Song
-#define i_valdrop Song_drop
-#define i_cmp Song_cmp
+#define i_val_class Song
+#define i_opt c_no_hash
#include <stc/carc.h>
// ... and a vector of it