summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-10-24 12:23:30 +0200
committerTyge Løvset <[email protected]>2022-10-24 12:23:30 +0200
commitcf2ff10878153588b69e7e34523773e2bc42d79e (patch)
tree8980db94a0c79f5b02489510159821c0b8f22a39 /docs
parent60611de13ad64442287c5a57c7aa874ad45273ab (diff)
downloadSTC-modified-cf2ff10878153588b69e7e34523773e2bc42d79e.tar.gz
STC-modified-cf2ff10878153588b69e7e34523773e2bc42d79e.zip
API CHANGE: Renamed input params for naming consisteny and usage:
i_key_class TYPE => i_keyclass TYPE i_val_class TYPE => i_valclass TYPE i_key_arcbox TYPE => i_keyboxed TYPE i_val_arcbox TYPE => i_valboxed TYPE i_key_bind, i_val_bind are removed.
Diffstat (limited to 'docs')
-rw-r--r--docs/carc_api.md4
-rw-r--r--docs/cbox_api.md6
-rw-r--r--docs/cmap_api.md8
-rw-r--r--docs/cvec_api.md2
4 files changed, 10 insertions, 10 deletions
diff --git a/docs/carc_api.md b/docs/carc_api.md
index 4dea2b2c..04856622 100644
--- a/docs/carc_api.md
+++ b/docs/carc_api.md
@@ -13,7 +13,7 @@ All **carc** functions can be called by multiple threads on different instances
additional synchronization even if these instances are copies and share ownership of the same object.
**carc** uses thread-safe atomic reference counting, through the *carc_X_clone()* and *carc_X_drop()* methods.
-When declaring a container with shared pointers, define `i_val_arcbox` with the carc type, see example.
+When declaring a container with shared pointers, define `i_valboxed` with the carc type, see example.
See similar c++ class [std::shared_ptr](https://en.cppreference.com/w/cpp/memory/shared_ptr) for a functional reference, or Rust [std::sync::Arc](https://doc.rust-lang.org/std/sync/struct.Arc.html) / [std::rc::Rc](https://doc.rust-lang.org/std/rc/struct.Rc.html).
@@ -89,7 +89,7 @@ bool carc_X_value_eq(const i_val* x, const i_val* y);
#include <stc/carc.h>
#define i_type Stack
-#define i_val_arcbox Arc // Note: use i_val_arcbox for carc or cbox value types
+#define i_valboxed Arc // Note: use i_valboxed for carc or cbox value types
#include <stc/cstack.h>
int main()
diff --git a/docs/cbox_api.md b/docs/cbox_api.md
index 43fa46b0..79911876 100644
--- a/docs/cbox_api.md
+++ b/docs/cbox_api.md
@@ -5,7 +5,7 @@ be empty. The *cbox_X_cmp()*, *cbox_X_drop()* methods are defined based on the `
and `i_valdrop` macros specified. Use *cbox_X_clone(p)* to make a deep copy, which uses the
`i_valclone` macro if defined.
-When declaring a container of **cbox** values, define `i_val_arcbox` with the
+When declaring a container of **cbox** values, define `i_valboxed` with the
cbox type instead of defining `i_val`. This will auto-set `i_valdrop`, `i_valclone`, and `i_cmp` using
functions defined by the specified **cbox**.
@@ -79,11 +79,11 @@ void int_drop(int* x) {
#include <stc/cbox.h>
#define i_type ISet
-#define i_key_arcbox IBox // NB: use i_key_arcbox instead of i_key
+#define i_keyboxed IBox // NB: use i_keyboxed instead of i_key
#include <stc/csset.h> // ISet : std::set<std::unique_ptr<int>>
#define i_type IVec
-#define i_val_arcbox IBox // NB: use i_val_arcbox instead of i_val
+#define i_valboxed IBox // NB: use i_valboxed instead of i_val
#include <stc/cvec.h> // IVec : std::vector<std::unique_ptr<int>>
int main()
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 119b72f2..bf56fcab 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -298,10 +298,10 @@ static inline void Viking_drop(Viking* vk) {
}
#define i_type Vikings
-#define i_key_class Viking
+#define i_keyclass Viking
#define i_val int
/*
- i_key_class implies these defines, unless they are already defined:
+ i_keyclass 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_class Viking
+#define i_keyclass 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_class implies these defines, unless they are already defined:
+ i_keyclass 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
diff --git a/docs/cvec_api.md b/docs/cvec_api.md
index 50fb4448..f4cedb75 100644
--- a/docs/cvec_api.md
+++ b/docs/cvec_api.md
@@ -206,7 +206,7 @@ User User_clone(User user) {
// Declare a managed, clonable vector of users.
#define i_type UVec
-#define i_val_class User // User is a "class" as it has _cmp, _clone and _drop functions.
+#define i_valclass User // User is a "class" as it has _cmp, _clone and _drop functions.
#include <stc/cvec.h>
int main(void) {