aboutsummaryrefslogtreecommitdiff
path: root/lib/std/atomic/stack.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2019-10-30 19:27:42 -0400
committerAndrew Kelley <andrew@ziglang.org>2019-10-30 20:22:05 -0400
commit0de862e8bafce9a58c1018e9b6f81b3d17279c10 (patch)
treed8b75a7683324c713d6fb53023ae6ae88f69e157 /lib/std/atomic/stack.zig
parent618ee5b63a2f817492b4da0d5c8b7fa1584680bc (diff)
downloadzig-0de862e8bafce9a58c1018e9b6f81b3d17279c10.tar.gz
zig-0de862e8bafce9a58c1018e9b6f81b3d17279c10.zip
make std.net more portable
* Delete `std.net.TmpWinAddr`. I don't think that was ever meant to be a real thing. * Delete `std.net.OsAddress`. This abstraction was not helpful. * Rename `std.net.Address` to `std.net.IpAddress`. It is now an extern union of IPv4 and IPv6 addresses. * Move `std.net.parseIp4` and `std.net.parseIp6` to the `std.net.IpAddress` namespace. They now return `IpAddress` instead of `u32` and `std.net.Ip6Addr`, which is deleted. * Add `std.net.IpAddress.parse` which accepts a port and parses either an IPv4 or IPv6 address. * Add `std.net.IpAddress.parseExpectingFamily` which additionally accepts a `family` parameter. * `std.net.IpAddress.initIp4` and `std.net.IpAddress.initIp6` are improved to directly take the address fields instead of a weird in-between type. * `std.net.IpAddress.port` is renamed to `std.net.IpAddress.getPort`. * Added `std.net.IpAddress.setPort`. * `os.sockaddr` struct on all targets is improved to match the corresponding system struct. Previously I had made it a union of sockaddr_in, sockaddr_in6, and sockaddr_un. The new abstraction for this is now `std.net.IpAddress`. * `os.sockaddr` and related bits are added for Windows. * `os.sockaddr` and related bits now have the `zero` fields default to zero initialization, and `len` fields default to the correct size. This is enough to abstract the differences across targets, and so no more switch on the target OS is needed in `std.net.IpAddress`. * Add the missing `os.sockaddr_un` on FreeBSD and NetBSD. * `std.net.IpAddress.initPosix` now takes a pointer to `os.sockaddr`.
Diffstat (limited to 'lib/std/atomic/stack.zig')
0 files changed, 0 insertions, 0 deletions