summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorTylo <[email protected]>2020-06-21 15:26:22 +0200
committerTylo <[email protected]>2020-06-21 15:26:22 +0200
commitfc26b38cb71cbc98504f511192d8fa2124fd1e4e (patch)
treed7556841daf14d5a886cf72fa1359354cc7622fc /README.md
parent173d32f0eb194b30b40fb5eb6e708bc3c4f8f421 (diff)
downloadSTC-modified-fc26b38cb71cbc98504f511192d8fa2124fd1e4e.tar.gz
STC-modified-fc26b38cb71cbc98504f511192d8fa2124fd1e4e.zip
Renamed files and classes: cmap -> chash, copt -> coption
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index 689a62bd..55862655 100644
--- a/README.md
+++ b/README.md
@@ -73,11 +73,11 @@ int main() {
```
CHash map of int -> int
```
-#include <stc/cmap.h>
+#include <stc/chash.h>
declare_CHash(ii, map, int, int);
int main() {
- CHash_ii nums = cmap_init;
+ CHash_ii nums = chash_init;
chash_ii_put(&nums, 8, 64);
chash_ii_put(&nums, 11, 121);
@@ -88,12 +88,12 @@ int main() {
CHash set of CString
```
#include <stc/cstring.h>
-#include <stc/cmap.h>
+#include <stc/chash.h>
declare_CHash_string(s, set); // Shorthand macro for the general declare_CHash expansion.
// CString keys are managed internally, although CHash is ignorant of CString.
int main() {
- CHash_s words = cmap_init;
+ CHash_s words = chash_init;
chash_s_put(&words, "Hello");
chash_s_put(&words, "Groovy");
chash_s_erase(&words, "Hello");
@@ -107,11 +107,11 @@ int main() {
CHash map of CString -> CString. Temporary CString values are created by "make", and moved to the container
```
#include <stc/cstring.h>
-#include <stc/cmap.h>
+#include <stc/chash.h>
declare_CHash_string(ss, map, CString, cstring_destroy);
int main() {
- CHash_ss table = cmap_init;
+ CHash_ss table = chash_init;
chash_ss_put(&table, "Make", cstring_make("my"));
chash_ss_put(&table, "Sunny", cstring_make("day"));
printf("Sunny: %s\n", chash_ss_get(table, "Sunny")->value.str);