aboutsummaryrefslogtreecommitdiff
path: root/tools/process_headers.zig
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2020-08-22 15:08:34 +0200
committerVeikka Tuominen <git@vexu.eu>2020-08-22 16:38:03 +0300
commit9605e5363b22874550687f5f96dc6cc8bf462115 (patch)
tree83ad776ba3b5e6dade2a3ac96e8f899f83245635 /tools/process_headers.zig
parent69de1a51cd4f43e1d7a1fab3208b835b6841579d (diff)
downloadzig-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.zig5
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);