summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-07-06 22:26:53 +0200
committerTyge Løvset <[email protected]>2022-07-06 22:26:53 +0200
commitb94170eefce899d0b236804681d77fe026956fd9 (patch)
tree9d1bad3bdfce085cc8ff8c567943ffd8750aa644 /docs
parent6e91820d7cf632ff30b936c554a0bdf83c9e64b2 (diff)
downloadSTC-modified-b94170eefce899d0b236804681d77fe026956fd9.tar.gz
STC-modified-b94170eefce899d0b236804681d77fe026956fd9.zip
Version 3.7. Make sure to check NEWS/Changes in README.md for a few code-breaking API changes.
Diffstat (limited to 'docs')
-rw-r--r--docs/carc_api.md2
-rw-r--r--docs/carray_api.md8
-rw-r--r--docs/cbox_api.md2
-rw-r--r--docs/cdeq_api.md8
-rw-r--r--docs/clist_api.md2
-rw-r--r--docs/cmap_api.md10
-rw-r--r--docs/cpque_api.md6
-rw-r--r--docs/cqueue_api.md2
-rw-r--r--docs/cset_api.md10
-rw-r--r--docs/csmap_api.md7
-rw-r--r--docs/csset_api.md2
-rw-r--r--docs/cstack_api.md8
-rw-r--r--docs/cstr_api.md1
-rw-r--r--docs/cvec_api.md8
14 files changed, 38 insertions, 38 deletions
diff --git a/docs/carc_api.md b/docs/carc_api.md
index bdab2533..534e3da3 100644
--- a/docs/carc_api.md
+++ b/docs/carc_api.md
@@ -39,7 +39,7 @@ carc_X carc_X_from_ptr(i_val* p); // create a carc
carc_X carc_X_clone(carc_X other); // return other with increased use count
carc_X carc_X_move(carc_X* self); // transfer ownership to another carc.
void carc_X_take(carc_X* self, carc_X other); // take ownership of other.
-void carc_X_copy(carc_X* self, carc_X other); // copy shared (increase use count)
+void carc_X_assign(carc_X* self, carc_X other); // copy shared (increase use count)
void carc_X_drop(carc_X* self); // destruct (decrease use count, free at 0)
long carc_X_use_count(carc_X ptr);
diff --git a/docs/carray_api.md b/docs/carray_api.md
index fba152c6..579bf119 100644
--- a/docs/carray_api.md
+++ b/docs/carray_api.md
@@ -26,11 +26,11 @@ carr2_X carr2_X_with_size(size_t xdim, size_t ydim, i_val val);
carr2_X carr2_X_with_data(size_t xdim, size_t ydim, i_val* array);
carr2_X carr2_X_new_uninit(size_t xdim, size_t ydim);
carr2_X carr2_X_clone(carr2_X arr);
-void carr2_X_copy(carr2_X* self, carr2_X other);
+void carr2_X_copy(carr2_X* self, const carr2_X* other);
i_val* carr2_X_release(carr2_X* self); // release storage (not freed)
void carr2_X_drop(carr2_X* self);
-size_t carr2_X_size(carr2_X arr);
+size_t carr2_X_size(const carr2_X* self);
i_val* carr2_X_data(carr2_X* self); // access storage data
const i_val* carr2_X_at(const carr2_X* self, size_t x, size_t y);
size_t carr2_X_idx(const carr2_X* self, size_t x, size_t y);
@@ -47,11 +47,11 @@ carr3_X carr3_X_with_size(size_t xdim, size_t ydim, size_t zdim, i_v
carr3_X carr3_X_with_data(size_t xdim, size_t ydim, size_t zdim, i_val* array);
carr3_X carr3_X_new_uninit(size_t xdim, size_t ydim, size_t zdim);
carr3_X carr3_X_clone(carr3_X arr);
-void carr3_X_copy(carr3_X* self, carr3_X other);
+void carr3_X_copy(carr3_X* self, const carr3_X* other);
i_val* carr3_X_release(carr3_X* self); // release storage (not freed)
void carr3_X_drop(carr3_X* self);
-size_t carr3_X_size(carr3_X arr);
+size_t carr3_X_size(const carr3_X* self);
i_val* carr3_X_data(carr3_X* self); // storage data
const i_val* carr3_X_at(const carr3_X* self, size_t x, size_t y, size_t z);
size_t carr3_X_idx(const carr3_X* self, size_t x, size_t y, size_t z);
diff --git a/docs/cbox_api.md b/docs/cbox_api.md
index 8709548a..4087ffa3 100644
--- a/docs/cbox_api.md
+++ b/docs/cbox_api.md
@@ -38,7 +38,7 @@ cbox_X cbox_X_from_ptr(i_val* p); // create a cbox f
cbox_X cbox_X_clone(cbox_X other); // return deep copied clone
cbox_X cbox_X_move(cbox_X* self); // transfer ownership to another cbox.
void cbox_X_take(cbox_X* self, cbox_X other); // take ownership of other.
-void cbox_X_copy(cbox_X* self, cbox_X other); // deep copy to self
+void cbox_X_assign(cbox_X* self, cbox_X other); // deep copy to self
void cbox_X_drop(cbox_X* self); // destruct the contained object and free's it.
void cbox_X_reset(cbox_X* self);
diff --git a/docs/cdeq_api.md b/docs/cdeq_api.md
index a1f1228f..1840468c 100644
--- a/docs/cdeq_api.md
+++ b/docs/cdeq_api.md
@@ -28,15 +28,15 @@ cdeq_X cdeq_X_with_capacity(size_t size);
cdeq_X cdeq_X_clone(cdeq_X deq);
void cdeq_X_clear(cdeq_X* self);
-void cdeq_X_copy(cdeq_X* self, cdeq_X other);
+void cdeq_X_copy(cdeq_X* self, const cdeq_X* other);
bool cdeq_X_reserve(cdeq_X* self, size_t cap);
void cdeq_X_shrink_to_fit(cdeq_X* self);
void cdeq_X_swap(cdeq_X* a, cdeq_X* b);
void cdeq_X_drop(cdeq_X* self); // destructor
-bool cdeq_X_empty(cdeq_X deq);
-size_t cdeq_X_size(cdeq_X deq);
-size_t cdeq_X_capacity(cdeq_X deq);
+bool cdeq_X_empty(const cdeq_X* self);
+size_t cdeq_X_size(const cdeq_X* self);
+size_t cdeq_X_capacity(const cdeq_X* self);
const cdeq_X_value* cdeq_X_at(const cdeq_X* self, size_t idx);
const cdeq_X_value* cdeq_X_get(const cdeq_X* self, i_valraw raw); // return NULL if not found
diff --git a/docs/clist_api.md b/docs/clist_api.md
index 58970a19..9cd950bb 100644
--- a/docs/clist_api.md
+++ b/docs/clist_api.md
@@ -42,7 +42,7 @@ clist_X clist_X_init(void);
clist_X clist_X_clone(clist_X list);
void clist_X_clear(clist_X* self);
-void clist_X_copy(clist_X* self, clist_X other);
+void clist_X_copy(clist_X* self, const clist_X* other);
void clist_X_drop(clist_X* self); // destructor
bool clist_X_empty(clist_X list);
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 58d33534..5804112f 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -48,17 +48,17 @@ cmap_X cmap_X_with_capacity(size_t cap);
cmap_X cmap_X_clone(cmap_x map);
void cmap_X_clear(cmap_X* self);
-void cmap_X_copy(cmap_X* self, cmap_X other);
+void cmap_X_copy(cmap_X* self, const cmap_X* other);
void cmap_X_max_load_factor(cmap_X* self, float max_load); // default: 0.85
bool cmap_X_reserve(cmap_X* self, size_t size);
void cmap_X_shrink_to_fit(cmap_X* self);
void cmap_X_swap(cmap_X* a, cmap_X* b);
void cmap_X_drop(cmap_X* self); // destructor
-size_t cmap_X_size(cmap_X map);
-size_t cmap_X_capacity(cmap_X map); // buckets * max_load_factor
-bool cmap_X_empty(cmap_X map);
-size_t cmap_X_bucket_count(cmap_X map); // num. of allocated buckets
+size_t cmap_X_size(const cmap_X* self);
+size_t cmap_X_capacity(const cmap_X self); // buckets * max_load_factor
+bool cmap_X_empty(const cmap_X* self );
+size_t cmap_X_bucket_count(const cmap_X* self); // num. of allocated buckets
const cmap_X_mapped* cmap_X_at(const cmap_X* self, i_keyraw rkey); // rkey must be in map
cmap_X_mapped* cmap_X_at_mut(cmap_X* self, i_keyraw rkey); // mutable at
diff --git a/docs/cpque_api.md b/docs/cpque_api.md
index d9a381cc..12f5c3bc 100644
--- a/docs/cpque_api.md
+++ b/docs/cpque_api.md
@@ -32,11 +32,11 @@ cpque_X cpque_X_clone(cpque_X pq);
void cpque_X_clear(cpque_X* self);
bool cpque_X_reserve(cpque_X* self, size_t n);
void cpque_X_shrink_to_fit(cpque_X* self);
-void cpque_X_copy(cpque_X* self, cpque_X other);
+void cpque_X_copy(cpque_X* self, const cpque_X* other);
void cpque_X_drop(cpque_X* self); // destructor
-size_t cpque_X_size(cpque_X pq);
-bool cpque_X_empty(cpque_X pq);
+size_t cpque_X_size(const cpque_X* self);
+bool cpque_X_empty(const cpque_X* self);
i_val* cpque_X_top(const cpque_X* self);
void cpque_X_make_heap(cpque_X* self); // heapify the vector.
diff --git a/docs/cqueue_api.md b/docs/cqueue_api.md
index ffb75216..1f5469d6 100644
--- a/docs/cqueue_api.md
+++ b/docs/cqueue_api.md
@@ -27,7 +27,7 @@ cqueue_X cqueue_X_init(void);
cqueue_X cqueue_X_clone(cqueue_X q);
void cqueue_X_clear(cqueue_X* self);
-void cqueue_X_copy(cqueue_X* self, cqueue_X other);
+void cqueue_X_copy(cqueue_X* self, const cqueue_X* other);
void cqueue_X_drop(cqueue_X* self); // destructor
size_t cqueue_X_size(cqueue_X q);
diff --git a/docs/cset_api.md b/docs/cset_api.md
index b325eaca..95a236b1 100644
--- a/docs/cset_api.md
+++ b/docs/cset_api.md
@@ -28,17 +28,17 @@ cset_X cset_X_with_capacity(size_t cap);
cset_X cset_X_clone(cset_x set);
void cset_X_clear(cset_X* self);
-void cset_X_copy(cset_X* self, cset_X other);
+void cset_X_copy(cset_X* self, const cset_X* other);
void cset_X_max_load_factor(cset_X* self, float max_load); // default: 0.85
bool cset_X_reserve(cset_X* self, size_t size);
void cset_X_shrink_to_fit(cset_X* self);
void cset_X_swap(cset_X* a, cset_X* b);
void cset_X_drop(cset_X* self); // destructor
-size_t cset_X_size(cset_X set); // num. of allocated buckets
-size_t cset_X_capacity(cset_X set); // buckets * max_load_factor
-bool cset_X_empty(cset_X set);
-size_t cset_X_bucket_count(cset_X set);
+size_t cset_X_size(const cset_X* self); // num. of allocated buckets
+size_t cset_X_capacity(const cset_X* self); // buckets * max_load_factor
+bool cset_X_empty(const cset_X* self);
+size_t cset_X_bucket_count(const cset_X* self);
bool cset_X_contains(const cset_X* self, i_keyraw rkey);
const cset_X_value* cset_X_get(const cset_X* self, i_keyraw rkey); // return NULL if not found
diff --git a/docs/csmap_api.md b/docs/csmap_api.md
index a797e3cd..b3cf668b 100644
--- a/docs/csmap_api.md
+++ b/docs/csmap_api.md
@@ -47,12 +47,13 @@ void csmap_X_shrink_to_fit(csmap_X* self);
csmap_X csmap_X_clone(csmap_x map);
void csmap_X_clear(csmap_X* self);
-void csmap_X_copy(csmap_X* self, csmap_X other);
+void csmap_X_copy(csmap_X* self, const csmap_X* other);
void csmap_X_swap(csmap_X* a, csmap_X* b);
void csmap_X_drop(csmap_X* self); // destructor
-size_t csmap_X_size(csmap_X map);
-bool csmap_X_empty(csmap_X map);
+size_t csmap_X_size(const csmap_X self);
+bool csmap_X_empty(const csmap_X* self);
+bool csmap_X_capacity(const csmap_X* self);
const csmap_X_mapped* csmap_X_at(const csmap_X* self, i_keyraw rkey); // rkey must be in map
csmap_X_mapped* csmap_X_at_mut(csmap_X* self, i_keyraw rkey); // mutable at
diff --git a/docs/csset_api.md b/docs/csset_api.md
index 5106a791..66ce8505 100644
--- a/docs/csset_api.md
+++ b/docs/csset_api.md
@@ -30,7 +30,7 @@ void csset_X_shrink_to_fit(csset_X* self);
csset_X csset_X_clone(csset_x set);
void csset_X_clear(csset_X* self);
-void csset_X_copy(csset_X* self, csset_X other);
+void csset_X_copy(csset_X* self, const csset_X* other);
void csset_X_swap(csset_X* a, csset_X* b);
void csset_X_drop(csset_X* self); // destructor
diff --git a/docs/cstack_api.md b/docs/cstack_api.md
index a72153e1..f148df38 100644
--- a/docs/cstack_api.md
+++ b/docs/cstack_api.md
@@ -32,12 +32,12 @@ void cstack_X_clear(cstack_X* self);
bool cstack_X_reserve(cstack_X* self, size_t n);
void cstack_X_shrink_to_fit(cstack_X* self);
i_val* cstack_X_append_uninit(cstack_X* self, size_t n);
-void cstack_X_copy(cstack_X* self, cstack_X other);
+void cstack_X_copy(cstack_X* self, const cstack_X* other);
void cstack_X_drop(cstack_X* self); // destructor
-size_t cstack_X_size(cstack_X st);
-size_t cstack_X_capacity(cstack_X st);
-bool cstack_X_empty(cstack_X st);
+size_t cstack_X_size(const cstack_X* self);
+size_t cstack_X_capacity(const cstack_X* self);
+bool cstack_X_empty(const cstack_X* self);
i_val* cstack_X_top(const cstack_X* self);
const i_val* cstack_X_at(const cstack_X* self, size_t idx);
diff --git a/docs/cstr_api.md b/docs/cstr_api.md
index 071da20a..7afdcf77 100644
--- a/docs/cstr_api.md
+++ b/docs/cstr_api.md
@@ -49,7 +49,6 @@ void cstr_clear(cstr* self);
char* cstr_assign(cstr* self, const char* str);
char* cstr_assign_s(cstr* self, cstr s);
char* cstr_assign_n(cstr* self, const char* str, size_t len); // assign n first chars of str
-void cstr_copy(cstr* self, cstr s); // like cstr_assign_s()
int cstr_printf(cstr* self, const char* fmt, ...); // printf() formatting
char* cstr_append(cstr* self, const char* app);
diff --git a/docs/cvec_api.md b/docs/cvec_api.md
index e504954c..db2bd8ce 100644
--- a/docs/cvec_api.md
+++ b/docs/cvec_api.md
@@ -33,7 +33,7 @@ cvec_X cvec_X_with_capacity(size_t size);
cvec_X cvec_X_clone(cvec_X vec);
void cvec_X_clear(cvec_X* self);
-void cvec_X_copy(cvec_X* self, cvec_X other);
+void cvec_X_copy(cvec_X* self, const cvec_X* other);
bool cvec_X_reserve(cvec_X* self, size_t cap);
bool cvec_X_resize(cvec_X* self, size_t size, i_val null);
cvec_X_value* cvec_X_append_uninit(cvec_X* self, size_t n); // return start of uninit
@@ -41,9 +41,9 @@ void cvec_X_shrink_to_fit(cvec_X* self);
void cvec_X_swap(cvec_X* a, cvec_X* b);
void cvec_X_drop(cvec_X* self); // destructor
-bool cvec_X_empty(cvec_X vec);
-size_t cvec_X_size(cvec_X vec);
-size_t cvec_X_capacity(cvec_X vec);
+bool cvec_X_empty(const cvec_X* self);
+size_t cvec_X_size(const cvec_X* self);
+size_t cvec_X_capacity(const cvec_X* self);
const cvec_X_value* cvec_X_at(const cvec_X* self, size_t idx);
const cvec_X_value* cvec_X_get(const cvec_X* self, i_valraw raw); // return NULL if not found