diff options
| author | Jan200101 <sentrycraft123@gmail.com> | 2020-08-22 15:08:34 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2020-08-22 16:38:03 +0300 |
| commit | 9605e5363b22874550687f5f96dc6cc8bf462115 (patch) | |
| tree | 83ad776ba3b5e6dade2a3ac96e8f899f83245635 /tools/process_headers.zig | |
| parent | 69de1a51cd4f43e1d7a1fab3208b835b6841579d (diff) | |
| download | zig-9605e5363b22874550687f5f96dc6cc8bf462115.tar.gz zig-9605e5363b22874550687f5f96dc6cc8bf462115.zip | |
update update_glibc and process_headers to latest zig
Diffstat (limited to 'tools/process_headers.zig')
| -rw-r--r-- | tools/process_headers.zig | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/process_headers.zig b/tools/process_headers.zig index 918802f65d..72b3fe8942 100644 --- a/tools/process_headers.zig +++ b/tools/process_headers.zig @@ -15,6 +15,7 @@ const Arch = std.Target.Cpu.Arch; const Abi = std.Target.Abi; const OsTag = std.Target.Os.Tag; const assert = std.debug.assert; +const Sha256 = std.crypto.hash.sha2.Sha256; const LibCTarget = struct { name: []const u8, @@ -313,7 +314,7 @@ pub fn main() !void { var max_bytes_saved: usize = 0; var total_bytes: usize = 0; - var hasher = std.crypto.hash.sha2.Sha256.init(.{}); + var hasher = Sha256.init(.{}); for (libc_targets) |libc_target| { const dest_target = DestTarget{ @@ -359,7 +360,7 @@ pub fn main() !void { const trimmed = std.mem.trim(u8, raw_bytes, " \r\n\t"); total_bytes += raw_bytes.len; const hash = try allocator.alloc(u8, 32); - hasher.reset(); + hasher = Sha256.init(.{}); hasher.update(rel_path); hasher.update(trimmed); hasher.final(hash); |
