From 92b950333c6c7002bdbf1b60af44a249dc0cef9c Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sun, 19 Dec 2021 12:21:44 +0100 Subject: First commit for Version 3 of STC. Main changes are consistent rename of '_del' to '_drop' and '_compare' to '_cmp'. Also i_key_ref (earlier i_key_sptr) and i_val_ref replaced by more general i_key_bind/i_val_bind. --- docs/cstack_api.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs/cstack_api.md') diff --git a/docs/cstack_api.md b/docs/cstack_api.md index e71b213f..b6992dc0 100644 --- a/docs/cstack_api.md +++ b/docs/cstack_api.md @@ -10,7 +10,7 @@ See the c++ class [std::stack](https://en.cppreference.com/w/cpp/container/stack ```c #define i_val // value: REQUIRED #define i_cmp // three-way compare two i_valraw* : REQUIRED IF i_valraw is a non-integral type -#define i_del // destroy value func - defaults to empty destruct +#define i_drop // destroy value func - defaults to empty destruct #define i_valraw // convertion "raw" type - defaults to i_val #define i_valfrom // convertion func i_valraw => i_val - defaults to plain copy #define i_valto // convertion func i_val* => i_valraw - defaults to plain copy @@ -31,7 +31,7 @@ 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); void cstack_X_copy(cstack_X* self, cstack_X other); -void cstack_X_del(cstack_X* self); // destructor +void cstack_X_drop(cstack_X* self); // destructor size_t cstack_X_size(cstack_X st); size_t cstack_X_capacity(cstack_X st); @@ -81,7 +81,7 @@ int main() { printf("top: %d\n", *cstack_i_top(&S)); - cstack_i_del(&S); + cstack_i_drop(&S); } ``` Output: -- cgit v1.2.3