diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/arc_containers.c | 6 | ||||
| -rw-r--r-- | examples/box2.c | 3 |
2 files changed, 7 insertions, 2 deletions
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 <stc/carc.h> #define i_type Stack #define i_valboxed Arc // define i_valboxed for carc/cbox value (not i_val) -#include <stc/cstack.h> +#define i_opt c_no_cmp +#include <stc/cvec.h> #define i_type List #define i_valboxed Arc // as above +#define i_opt c_no_cmp #include <stc/clist.h> 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 <stc/cbox.h> // cbox_Point #define i_val Rectangle +#define i_opt c_no_lookup #include <stc/cbox.h> // 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 <stc/cbox.h> // cbox_BoxPoint Point origin(void) { |
