From 178f4f9048cc4b4db30d5ee694c3eb3158c34749 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 15 Nov 2022 18:50:49 +0100 Subject: More internal cleanup and fixes for cbox and carc. --- examples/arc_containers.c | 6 ++++-- examples/box2.c | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/arc_containers.c b/examples/arc_containers.c index 5a8b3653..b577f2c8 100644 --- a/examples/arc_containers.c +++ b/examples/arc_containers.c @@ -12,15 +12,17 @@ #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 +#define i_opt c_no_atomic|c_no_lookup #include #define i_type Stack #define i_valboxed Arc // define i_valboxed for carc/cbox value (not i_val) -#include +#define i_opt c_no_cmp +#include #define i_type List #define i_valboxed Arc // as above +#define i_opt c_no_cmp #include int main() diff --git a/examples/box2.c b/examples/box2.c index 03f7d8bd..b9628eeb 100644 --- a/examples/box2.c +++ b/examples/box2.c @@ -18,15 +18,18 @@ struct { } typedef Rectangle; #define i_val Point +#define i_opt c_no_lookup #include // cbox_Point #define i_val Rectangle +#define i_opt c_no_lookup #include // cbox_Rectangle // Box in box: #define i_valboxed cbox_Point // NB: use i_valboxed when value is a cbox or carc! // it will auto define i_valdrop, i_valfrom, and i_cmp. #define i_tag BoxPoint +#define i_opt c_no_lookup #include // cbox_BoxPoint Point origin(void) { -- cgit v1.2.3