From c476ca69084c1a3d6c95625a61f05c41aec71335 Mon Sep 17 00:00:00 2001 From: Tyge Date: Tue, 28 Apr 2020 23:07:54 +0200 Subject: Updated advanced_example, parameter sequence. --- advanced_example.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/advanced_example.md b/advanced_example.md index ff93c4c9..0206d4a2 100644 --- a/advanced_example.md +++ b/advanced_example.md @@ -64,10 +64,9 @@ size_t personview_hash(const struct PersonView* pv, size_t ignore) { ``` With this in place, we can declare the map Person -> int: ``` -declare_CMap(ex, struct Person, int, c_noDestroy, - personview_hash, personview_compare, person_destroy, - struct PersonView, person_getView, person_fromView); - +declare_CMap(ex, struct Person, int, c_noDestroy, person_destroy, + struct PersonView, personview_hash, personview_compare, + person_getView, person_fromView); ``` Note we use struct PersonView to put keys in the map, but keys are stored as struct Person with proper dynamically allocated CStrings to store name and surname. ``` -- cgit v1.2.3