From d659ccdc85769a681f3981456659cb778b56fcf1 Mon Sep 17 00:00:00 2001 From: Tyge Løvset <60263450+tylov@users.noreply.github.com> Date: Sun, 21 Jun 2020 15:30:22 +0200 Subject: Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 65308788..d5ab26b1 100644 --- a/README.md +++ b/README.md @@ -146,11 +146,11 @@ int main() { ``` **CHash map** of *int -> int* ``` -#include +#include 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); @@ -161,12 +161,12 @@ int main() { **CHash set** of *CString* ``` #include -#include +#include 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"); @@ -180,11 +180,11 @@ int main() { **CHash map** of *CString -> CString*. Temporary CString values are created by "make", and moved to the container ``` #include -#include +#include 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); -- cgit v1.2.3