diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-09 02:16:54 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-09 02:16:54 -0700 |
| commit | 6d9119fcd91cd01d658180d7fa5e4c8c203ba3db (patch) | |
| tree | 95343f47aa29a3660e9ba1afee30ec27d1e192db /std | |
| parent | bdca82ea66259de136ce9374e172f567ee93ef89 (diff) | |
| download | zig-6d9119fcd91cd01d658180d7fa5e4c8c203ba3db.tar.gz zig-6d9119fcd91cd01d658180d7fa5e4c8c203ba3db.zip | |
add memcpy and memset intrinsics
Diffstat (limited to 'std')
| -rw-r--r-- | std/std.zig | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/std/std.zig b/std/std.zig index e1d669624f..d42074a340 100644 --- a/std/std.zig +++ b/std/std.zig @@ -118,13 +118,7 @@ fn buf_print_u64(out_buf: []u8, x: u64) -> usize { const len = buf.len - index; - // TODO memcpy intrinsic - // @memcpy(out_buf, buf, len); - var i: usize = 0; - while (i < len) { - out_buf[i] = buf[index + i]; - i += 1; - } + @memcpy(out_buf.ptr, &buf[index], len); return len; } |
