diff options
| author | Sébastien Marie <semarie@online.fr> | 2021-03-02 08:09:51 +0000 |
|---|---|---|
| committer | Isaac Freund <ifreund@ifreund.xyz> | 2021-03-12 15:04:36 +0100 |
| commit | 89e522b935a8cca96b2e6d0cce0515a1eb8e6451 (patch) | |
| tree | 937a1ea13abd2cf8bae6b6f48f44230dd8ab5ae4 /lib/std/Thread.zig | |
| parent | e9a038c33bbf171695b08540536f307b9e418173 (diff) | |
| download | zig-89e522b935a8cca96b2e6d0cce0515a1eb8e6451.tar.gz zig-89e522b935a8cca96b2e6d0cce0515a1eb8e6451.zip | |
make std.c.getErrno() return same type as _errno() aka c_int
adjust std.os.unexpectedErrno() to be correct for all std.os.system.errno (c_int, u12, usize, ...)
Diffstat (limited to 'lib/std/Thread.zig')
| -rw-r--r-- | lib/std/Thread.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index b9a69d151f..7e8a6226e6 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -362,7 +362,7 @@ pub fn spawn(comptime startFn: anytype, context: SpawnContextType(@TypeOf(startF os.EAGAIN => return error.SystemResources, os.EPERM => unreachable, os.EINVAL => unreachable, - else => return os.unexpectedErrno(@intCast(usize, err)), + else => return os.unexpectedErrno(err), } return thread_obj; |
