From fc9430f56798a53f9393a697f4ccd6bf9981b970 Mon Sep 17 00:00:00 2001 From: Martin Wickham Date: Thu, 3 Jun 2021 15:39:26 -0500 Subject: 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 --- lib/std/process.zig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/std/process.zig') diff --git a/lib/std/process.zig b/lib/std/process.zig index f026c640e0..d5a2045699 100644 --- a/lib/std/process.zig +++ b/lib/std/process.zig @@ -85,7 +85,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap { i += 1; // skip over null byte - try result.setMove(key, value); + try result.putMove(key, value); } return result; } else if (builtin.os.tag == .wasi) { @@ -112,7 +112,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap { var parts = mem.split(pair, "="); const key = parts.next().?; const value = parts.next().?; - try result.set(key, value); + try result.put(key, value); } return result; } else if (builtin.link_libc) { @@ -126,7 +126,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap { while (line[end_i] != 0) : (end_i += 1) {} const value = line[line_i + 1 .. end_i]; - try result.set(key, value); + try result.put(key, value); } return result; } else { @@ -139,7 +139,7 @@ pub fn getEnvMap(allocator: *Allocator) !BufMap { while (line[end_i] != 0) : (end_i += 1) {} const value = line[line_i + 1 .. end_i]; - try result.set(key, value); + try result.put(key, value); } return result; } -- cgit v1.2.3