diff options
| author | Tyge <[email protected]> | 2020-04-28 23:07:54 +0200 |
|---|---|---|
| committer | Tyge <[email protected]> | 2020-04-28 23:07:54 +0200 |
| commit | c476ca69084c1a3d6c95625a61f05c41aec71335 (patch) | |
| tree | 7a899e6c3c940944d90902887901c3341b34bc64 | |
| parent | dcd92861d79cf2b225cd12effc970eec556a4c2f (diff) | |
| download | STC-modified-c476ca69084c1a3d6c95625a61f05c41aec71335.tar.gz STC-modified-c476ca69084c1a3d6c95625a61f05c41aec71335.zip | |
Updated advanced_example, parameter sequence.
| -rw-r--r-- | advanced_example.md | 7 |
1 files 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.
```
|
