summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-03-24 19:22:39 +0100
committerGitHub <[email protected]>2020-03-24 19:22:39 +0100
commit08312fe8bffa7c0fb59612a6fb6b6f463cae6d9b (patch)
tree9cea92a61518e43aee4d419fb685a513023b497e
parente8e38fcfa593552f70b6f7c229b459c136ae4e01 (diff)
downloadSTC-modified-08312fe8bffa7c0fb59612a6fb6b6f463cae6d9b.tar.gz
STC-modified-08312fe8bffa7c0fb59612a6fb6b6f463cae6d9b.zip
Update EXAMPLE.md
-rw-r--r--EXAMPLE.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/EXAMPLE.md b/EXAMPLE.md
index efdf1800..9c901995 100644
--- a/EXAMPLE.md
+++ b/EXAMPLE.md
@@ -29,8 +29,6 @@ void person_destroy(struct Person* p) {
cstring_destroy(&p->surname);
}
-#define person_compareVal(x, y) person_compare(&x, &y)
-
int person_compare(struct Person* x, struct Person* y) {
int c;
c = strcmp(x->name.str, y->name.str); if (c != 0) return c;
@@ -54,7 +52,7 @@ size_t person_hash(const struct Person* p, size_t ignore) {
With this in place, you can instantiate a CMap with Person => CString:
```
#include <c_lib/CMap.h>
-declare_CMap(ex, struct Person, CString, cstring_destroy, person_hash, person_compareVal, person_destroy);
+declare_CMap(ex, struct Person, CString, cstring_destroy, person_hash, person_compare, person_destroy);
int main()
{