aboutsummaryrefslogtreecommitdiff
path: root/src/Package.zig
diff options
context:
space:
mode:
authorMartin Wickham <spexguy070@gmail.com>2021-06-03 15:39:26 -0500
committerMartin Wickham <spexguy070@gmail.com>2021-06-03 17:02:16 -0500
commitfc9430f56798a53f9393a697f4ccd6bf9981b970 (patch)
tree69a1a3b359e970349f9466f85a370918d78b7217 /src/Package.zig
parent87dae0ce98fde1957a9290c22866b3101ce419d8 (diff)
downloadzig-fc9430f56798a53f9393a697f4ccd6bf9981b970.tar.gz
zig-fc9430f56798a53f9393a697f4ccd6bf9981b970.zip
Breaking hash map changes for 0.8.0
- hash/eql functions moved into a Context object - *Context functions pass an explicit context - *Adapted functions pass specialized keys and contexts - new getPtr() function returns a pointer to value - remove functions renamed to fetchRemove - new remove functions return bool - removeAssertDiscard deleted, use assert(remove(...)) instead - Keys and values are stored in separate arrays - Entry is now {*K, *V}, the new KV is {K, V} - BufSet/BufMap functions renamed to match other set/map types - fixed iterating-while-modifying bug in src/link/C.zig
Diffstat (limited to 'src/Package.zig')
-rw-r--r--src/Package.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Package.zig b/src/Package.zig
index 5fec4be3d2..1f19c1d43a 100644
--- a/src/Package.zig
+++ b/src/Package.zig
@@ -100,9 +100,9 @@ pub fn destroy(pkg: *Package, gpa: *Allocator) void {
}
{
- var it = pkg.table.iterator();
- while (it.next()) |kv| {
- gpa.free(kv.key);
+ var it = pkg.table.keyIterator();
+ while (it.next()) |key| {
+ gpa.free(key.*);
}
}