summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-19 15:30:20 +0200
committerTyge Løvset <[email protected]>2022-10-19 15:30:20 +0200
commitbb3a457e5c2c9e6b069ab3dfba10f9d21686b035 (patch)
tree5e0947fbf0be670f569595a2dbc28f24938e18c6 /docs
parent4c643c261e124460e6b7c41a9cf67c66a4213189 (diff)
downloadSTC-modified-bb3a457e5c2c9e6b069ab3dfba10f9d21686b035.tar.gz
STC-modified-bb3a457e5c2c9e6b069ab3dfba10f9d21686b035.zip
- 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.
Diffstat (limited to 'docs')
-rw-r--r--docs/carc_api.md9
-rw-r--r--docs/cmap_api.md6
2 files changed, 6 insertions, 9 deletions
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 <stc/csmap.h>
#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 <stc/carc.h>
#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 <stc/cstack.h>
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 <stc/cmap.h>
/*
- 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