Skip to content

Commit 1fb2381

Browse files
authored
Merge pull request #19630 from mlugg/comptime-ptr-access-5
compiler: rework comptime pointer representation and access
2 parents 77abd3a + 23062a5 commit 1fb2381

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+4843
-2534
lines changed

lib/compiler/resinator/ico.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ test "icon data size too small" {
232232
try std.testing.expectError(error.ImpossibleDataSize, read(std.testing.allocator, fbs.reader(), data.len));
233233
}
234234

235-
pub const ImageFormat = enum {
235+
pub const ImageFormat = enum(u2) {
236236
dib,
237237
png,
238238
riff,
@@ -272,7 +272,7 @@ pub const BitmapHeader = extern struct {
272272
}
273273

274274
/// https://en.wikipedia.org/wiki/BMP_file_format#DIB_header_(bitmap_information_header)
275-
pub const Version = enum {
275+
pub const Version = enum(u3) {
276276
unknown,
277277
@"win2.0", // Windows 2.0 or later
278278
@"nt3.1", // Windows NT, 3.1x or later

lib/docs/wasm/markdown/Document.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub const Node = struct {
131131
}
132132
};
133133

134-
pub const TableCellAlignment = enum {
134+
pub const TableCellAlignment = enum(u2) {
135135
unset,
136136
left,
137137
center,

lib/std/net.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ pub const Ip4Address = extern struct {
271271
sa: posix.sockaddr.in,
272272

273273
pub fn parse(buf: []const u8, port: u16) IPv4ParseError!Ip4Address {
274-
var result = Ip4Address{
274+
var result: Ip4Address = .{
275275
.sa = .{
276276
.port = mem.nativeToBig(u16, port),
277277
.addr = undefined,

0 commit comments

Comments
 (0)