summaryrefslogtreecommitdiffhomepage
path: root/docs/cmap_api.md
diff options
context:
space:
mode:
authorTyge Lovset <[email protected]>2023-05-23 14:33:24 +0200
committerTyge Lovset <[email protected]>2023-05-23 14:33:24 +0200
commitf80a78239f545d7d73c8358056dd5d5825ccfe0b (patch)
tree83b3e266555f1d4bd42412ea5a711a49e3002396 /docs/cmap_api.md
parent0b34cadda2bc4da1cb0904989c8a5f2fe0236358 (diff)
downloadSTC-modified-f80a78239f545d7d73c8358056dd5d5825ccfe0b.tar.gz
STC-modified-f80a78239f545d7d73c8358056dd5d5825ccfe0b.zip
Updated docs to reflect changes in cstr linking shared.
Diffstat (limited to 'docs/cmap_api.md')
-rw-r--r--docs/cmap_api.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 2c9ac8ed..69e547a0 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -114,6 +114,7 @@ bool c_memcmp_eq(const i_keyraw* a, const i_keyraw* b); // !
## Examples
```c
+#define i_implement
#include <stc/cstr.h>
#define i_key_str
@@ -157,6 +158,7 @@ The HEX of color BLACK is:[#000000]
### Example 2
This example uses a cmap with cstr as mapped value.
```c
+#define i_implement
#include <stc/cstr.h>
#define i_type IDMap
#define i_key int
@@ -267,6 +269,7 @@ Output:
### Example 5: Advanced
Key type is struct.
```c
+#define i_implement
#include <stc/cstr.h>
typedef struct {
@@ -335,6 +338,7 @@ In example 5 we needed to construct a lookup key which allocated strings, and th
In this example we use rawtype feature to make it even simpler to use. Note that we must use the emplace() methods
to add "raw" type entries (otherwise compile error):
```c
+#define i_implement
#include <stc/cstr.h>
typedef struct Viking {