summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2021-12-14 21:51:40 +0100
committerTyge Løvset <[email protected]>2021-12-14 21:51:40 +0100
commit9b83dd92e4ea590406ded5276b44cd83b4cf3b86 (patch)
tree91bd836b67c77e19d0bf4c9955eef3088d8fa6fb /examples
parentc0949ad7193619eda7df29291d9e1166fecada63 (diff)
downloadSTC-modified-9b83dd92e4ea590406ded5276b44cd83b4cf3b86.tar.gz
STC-modified-9b83dd92e4ea590406ded5276b44cd83b4cf3b86.zip
Final update of box2.c example.
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