diff options
| author | Julian Hurst <julian.hurst92@gmail.com> | 2022-05-16 00:35:21 +0200 |
|---|---|---|
| committer | Julian Hurst <julian.hurst92@gmail.com> | 2022-05-16 00:35:21 +0200 |
| commit | 9740eee555cac43cc27e08a39a38e09a96ecb002 (patch) | |
| tree | 555c0fd89906364a8f527c8f1c72ab81b8303adf /set | |
| parent | 35639332a5dc8e9b26e8299c999940a9b6ca2ddb (diff) | |
| download | ilhare-9740eee555cac43cc27e08a39a38e09a96ecb002.tar.gz | |
Add layout and a common widget type
Diffstat (limited to 'set')
| -rw-r--r-- | set/set.ha | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -33,11 +33,16 @@ export fn contains(s: set, item: size) (size | nosuchitem) = { return nosuchitem; }; -// Clears all items +// Clears all items. export fn clear(s: *set) void = { delete(s.items[..]); }; +// Free the underlying slice. +export fn finish(s: *set) void = { + free(s.items); +}; + @test fn add() void = { let s = set {...}; assert(add(&s, 1z)); |
