diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-29 00:19:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 00:19:55 -0700 |
| commit | d65b42e07caa00dfe2f2fbf221c593ce57882784 (patch) | |
| tree | 7926cbea1499e0affe930bf6d7455dc24adf014e /lib/std/target.zig | |
| parent | fd6200eda6d4fe19c34a59430a88a9ce38d6d7a4 (diff) | |
| parent | fa200ca0cad2705bad40eb723dedf4e3bf11f2ff (diff) | |
| download | zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.tar.gz zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.zip | |
Merge pull request #15481 from ziglang/use-mem-intrinsics
actually use the new memory intrinsics
Diffstat (limited to 'lib/std/target.zig')
| -rw-r--r-- | lib/std/target.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/target.zig b/lib/std/target.zig index d9214f7be6..f23e32fbe7 100644 --- a/lib/std/target.zig +++ b/lib/std/target.zig @@ -1596,7 +1596,7 @@ pub const Target = struct { /// Asserts that the length is less than or equal to 255 bytes. pub fn set(self: *DynamicLinker, dl_or_null: ?[]const u8) void { if (dl_or_null) |dl| { - mem.copy(u8, &self.buffer, dl); + @memcpy(self.buffer[0..dl.len], dl); self.max_byte = @intCast(u8, dl.len - 1); } else { self.max_byte = null; @@ -1612,7 +1612,7 @@ pub const Target = struct { return r.*; } fn copy(r: *DynamicLinker, s: []const u8) DynamicLinker { - mem.copy(u8, &r.buffer, s); + @memcpy(r.buffer[0..s.len], s); r.max_byte = @intCast(u8, s.len - 1); return r.*; } |
