diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-06-04 01:12:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-04 01:12:38 -0400 |
| commit | 7d15a3ac71c5d8dc8c08dfd8ea8ad43d4eae188a (patch) | |
| tree | ae007106526e300bb7143be003fe8d847ba7230c /src/main.zig | |
| parent | 87dae0ce98fde1957a9290c22866b3101ce419d8 (diff) | |
| parent | 6953c8544b68c788dca4ed065e4a15eccbd4446b (diff) | |
| download | zig-7d15a3ac71c5d8dc8c08dfd8ea8ad43d4eae188a.tar.gz zig-7d15a3ac71c5d8dc8c08dfd8ea8ad43d4eae188a.zip | |
Merge pull request #8975 from SpexGuy/hash-map-updates
Breaking hash map changes for 0.8.0
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index 2017f17789..9245f5fd8a 100644 --- a/src/main.zig +++ b/src/main.zig @@ -180,7 +180,7 @@ pub fn mainArgs(gpa: *Allocator, arena: *Allocator, args: []const []const u8) !v "in order to determine where libc is installed. However the system C " ++ "compiler is `zig cc`, so no libc installation was found.", .{}); } - try env_map.set(inf_loop_env_key, "1"); + try env_map.put(inf_loop_env_key, "1"); // Some programs such as CMake will strip the `cc` and subsequent args from the // CC environment variable. We detect and support this scenario here because of @@ -2310,9 +2310,9 @@ fn updateModule(gpa: *Allocator, comp: *Compilation, hook: AfterUpdateHook) !voi fn freePkgTree(gpa: *Allocator, pkg: *Package, free_parent: bool) void { { - var it = pkg.table.iterator(); - while (it.next()) |kv| { - freePkgTree(gpa, kv.value, true); + var it = pkg.table.valueIterator(); + while (it.next()) |value| { + freePkgTree(gpa, value.*, true); } } if (free_parent) { @@ -3895,7 +3895,7 @@ pub fn cmdChangelist( var it = inst_map.iterator(); while (it.next()) |entry| { try stdout.print(" %{d} => %{d}\n", .{ - entry.key, entry.value, + entry.key_ptr.*, entry.value_ptr.*, }); } } @@ -3904,7 +3904,7 @@ pub fn cmdChangelist( var it = extra_map.iterator(); while (it.next()) |entry| { try stdout.print(" {d} => {d}\n", .{ - entry.key, entry.value, + entry.key_ptr.*, entry.value_ptr.*, }); } } |
