summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/box2.c8
1 files changed, 3 insertions, 5 deletions
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 <stc/cbox.h> // cbox_Box
+#include <stc/cbox.h> // cbox_Point
#define i_val Rectangle
#define i_opt c_no_compare
#include <stc/cbox.h> // 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 <stc/cbox.h> // cbox_BoxPoint