Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
update for zig master
Browse files Browse the repository at this point in the history
  • Loading branch information
leecannon authored Jun 27, 2023
1 parent 084aae6 commit 95644d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
17 changes: 0 additions & 17 deletions .devcontainer/devcontainer.json

This file was deleted.

6 changes: 0 additions & 6 deletions .vscode/extensions.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/backend/Backend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ pub fn Backend(comptime config: Config) type {
};

inline fn getSelf(interface: System) *Self {
return @ptrCast(*Self, @alignCast(@alignOf(Self), interface._ptr));
return @as(*Self, @ptrCast(@alignCast(interface._ptr)));
}

comptime {
Expand Down
6 changes: 3 additions & 3 deletions src/backend/FileSystemBackend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub fn FileSystemBackend(comptime config: Config) type {
break :blk permissions;
};

const CWD = @ptrFromInt(*anyopaque, std.mem.alignBackward(std.math.maxInt(usize), @alignOf(View)));
const CWD: *anyopaque = @ptrFromInt(std.mem.alignBackward(std.math.maxInt(usize), @alignOf(View)));

const Self = @This();
const FileSystemType = Self;
Expand All @@ -55,7 +55,7 @@ pub fn FileSystemBackend(comptime config: Config) type {
};
errdefer self.destroy();

try self.entries.ensureTotalCapacity(allocator, @intCast(u32, fsd.entries.items.len));
try self.entries.ensureTotalCapacity(allocator, @intCast(fsd.entries.items.len));

var opt_root: ?*Entry = null;
var opt_cwd_entry: ?*Entry = null;
Expand Down Expand Up @@ -199,7 +199,7 @@ pub fn FileSystemBackend(comptime config: Config) type {

/// Cast the given `ptr` to a view if it is one.
inline fn toView(self: *Self, ptr: *anyopaque) ?*View {
const view = @ptrCast(*View, @alignCast(@alignOf(View), ptr));
const view = @as(*View, @ptrCast(@alignCast(ptr)));
if (self.views.contains(view)) {
return view;
}
Expand Down

0 comments on commit 95644d6

Please sign in to comment.