summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-11-13 11:25:25 +0100
committerTyge Løvset <[email protected]>2022-11-13 11:25:25 +0100
commit99fb2a81c771739e11091b84161f03d740eab084 (patch)
tree11fcb6b1fe8497b0cfa524987ec300fdf269557e /README.md
parente0fc0f2ec3846334496ab90b46ce1d69e9bbd230 (diff)
downloadSTC-modified-99fb2a81c771739e11091b84161f03d740eab084.tar.gz
STC-modified-99fb2a81c771739e11091b84161f03d740eab084.zip
Reverted forward declaration from c_declare_X back to c_forward_X, and the flag "i_opt c_declared" to "i_opt c_is_forward". Sorry about this, but hopefully not a widely used feature for most yet.
Diffstat (limited to 'README.md')
-rw-r--r--README.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/README.md b/README.md
index 6752f607..5531a98b 100644
--- a/README.md
+++ b/README.md
@@ -310,7 +310,7 @@ The list of template parameters:
Properties:
- `i_tag` - Container type name tag. Defaults to *i_key* name.
- `i_type` - Full container type name. Alternative to *i_tag*.
-- `i_opt` - Boolean properties: may combine *c_no_cmp*, *c_no_clone*, *c_no_atomic*, *c_declared*, *c_static*, *c_header* with the *|* separator.
+- `i_opt` - Boolean properties: may combine *c_no_cmp*, *c_no_clone*, *c_no_atomic*, *c_is_forward*, *c_static*, *c_header* with the *|* separator.
Key:
- `i_keydrop` - Destroy map/set key func - defaults to empty destructor.
@@ -425,7 +425,7 @@ but still not expose or include the full implementation / API of the container.
```c
// Header file
#include <stc/forward.h> // only include data structures
-declare_cstack(cstack_pnt, struct Point); // declare cstack_pnt (and cstack_pnt_value, cstack_pnt_iter);
+forward_cstack(cstack_pnt, struct Point); // declare cstack_pnt (and cstack_pnt_value, cstack_pnt_iter);
// struct Point may be an incomplete type.
typedef struct Dataset {
cstack_pnt vertices;
@@ -434,7 +434,7 @@ typedef struct Dataset {
...
// Implementation
-#define c_opt c_declared // flag that the container was forward declared.
+#define c_opt c_is_forward // flag that the container was forward declared.
#define i_val struct Point
#define i_tag pnt
#include <stc/cstack.h>
@@ -527,7 +527,7 @@ Memory efficiency
- Replaced: *csview_first_token()* and *csview_next_token()* with one function: `csview_token()`.
- Added: **checkauto** tool for checking that c-source files uses `c_auto*` macros correctly.
- Added: general `i_keyclass` / `i_valclass` template parameters which auto-binds template functions.
-- Added: `i_opt` template parameter: compile-time options: `c_no_cmp`, `c_no_clone`, `c_no_atomic`, `c_declared`; may be combined with `|`
+- Added: `i_opt` template parameter: compile-time options: `c_no_cmp`, `c_no_clone`, `c_no_atomic`, `c_is_forward`; may be combined with `|`
- Added: [**cbox**](docs/cbox_api.md) type: smart pointer, similar to [Rust Box](https://doc.rust-lang.org/rust-by-example/std/box.html) and [std::unique_ptr](https://en.cppreference.com/w/cpp/memory/unique_ptr).
- Added: [**c_forpair**](docs/ccommon_api.md) macro: for-loop with "structured binding"