From bb3a457e5c2c9e6b069ab3dfba10f9d21686b035 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Wed, 19 Oct 2022 15:30:20 +0200 Subject: - Removed deprecated carc_make and cbox_make (replaced by carc_from, cbox_from) - Some improvements to template.h - Many smaller improvements to examples and docs. --- docs/carc_api.md | 9 +++------ docs/cmap_api.md | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/carc_api.md b/docs/carc_api.md index fd20ad01..08070889 100644 --- a/docs/carc_api.md +++ b/docs/carc_api.md @@ -84,15 +84,12 @@ bool carc_X_value_eq(const i_val* x, const i_val* y); #include #define i_type Arc // (atomic) ref. counted pointer -#define i_val Map -#define i_valclone Map_clone -// override Map_drop(p): -#define i_valdrop(p) (printf("drop Arc:\n"), Map_drop(p)) -#define i_opt c_no_atomic // make it non-atomic sharing. +#define i_val_bind Map // Note i_val_bind: Map is a "class", i.e. has clone, drop functions. +#define i_valdrop(p) (printf("drop Arc:\n"), Map_drop(p)) // override Map_drop(p): #include #define i_type Stack -#define i_val_arcbox Arc // NB: define i_val_arcbox for carc or cbox value-type +#define i_val_arcbox Arc // Note: use i_val_arcbox for carc or cbox value types #include int main() diff --git a/docs/cmap_api.md b/docs/cmap_api.md index 863fbaf6..10bca836 100644 --- a/docs/cmap_api.md +++ b/docs/cmap_api.md @@ -301,7 +301,7 @@ static inline void Viking_drop(Viking* vk) { #define i_key_bind Viking #define i_val int /* - i_key_bind makes these defines, unless they are already defined: + i_key_bind implies these defines, unless they are already defined: #define i_cmp Viking_cmp #define i_hash Viking_hash #define i_keyclone Viking_clone @@ -377,7 +377,7 @@ static inline RViking Viking_toraw(const Viking* vp) { // With this in place, we define the Viking => int hash map type: #define i_type Vikings -#define i_key_bind Viking +#define i_key_bind Viking #define i_keyraw RViking #define i_keyfrom Viking_from #define i_opt c_no_clone // disable map cloning @@ -385,7 +385,7 @@ static inline RViking Viking_toraw(const Viking* vp) { #define i_val int #include /* - i_key_bind sets up these defines, unless they are already defined: + i_key_bind implies these defines, unless they are already defined: #define i_cmp RViking_cmp //#define i_hash RViking_hash // already defined above. //#define i_keyclone Viking_clone // not used because c_no_clone -- cgit v1.2.3