From 9b83dd92e4ea590406ded5276b44cd83b4cf3b86 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Tue, 14 Dec 2021 21:51:40 +0100 Subject: Final update of box2.c example. --- examples/box2.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/box2.c b/examples/box2.c index 30fc5405..86374a96 100644 --- a/examples/box2.c +++ b/examples/box2.c @@ -19,17 +19,15 @@ struct { #define i_val Point #define i_opt c_no_compare -#include // cbox_Box +#include // cbox_Point #define i_val Rectangle #define i_opt c_no_compare #include // cbox_Rectangle // Box in box: -#define i_val cbox_Point -#define i_del(bp) cbox_Point_del(bp) -#define i_from(b) cbox_Point_clone(b) -#define i_opt c_no_compare +#define i_val_ref cbox_Point // NB: adviced to use i_val_ref when value is a cbox or csptr! + // it will auto-set i_del, i_from, i_cmp for you. #define i_tag BoxPoint #include // cbox_BoxPoint -- cgit v1.2.3