Merge pull request #105 from Browsercore/zig-upgrade

Zig upgrade to 0.12.0-dev.1773+8a8fd47d2
This commit is contained in:
Pierre Tachoire
2023-12-05 14:17:56 +01:00
committed by GitHub
8 changed files with 11 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/browsercore/zig-browsercore:0.11.0 image: ghcr.io/browsercore/zig-browsercore:0.12.0-dev.1773-8a8fd47d2
credentials: credentials:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/browsercore/zig:0.11.0 image: ghcr.io/browsercore/zig:0.12.0-dev.1773-8a8fd47d2
credentials: credentials:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/browsercore/zig-browsercore:0.11.0 image: ghcr.io/browsercore/zig-browsercore:0.12.0-dev.1773-8a8fd47d2
credentials: credentials:
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -155,6 +155,9 @@ fn linkNetSurf(step: *std.build.LibExeObjStep) void {
// wrapper // wrapper
const flags = [_][]const u8{}; const flags = [_][]const u8{};
const files: [1][]const u8 = .{ns ++ "wrapper/wrapper.c"}; const files: [1][]const u8 = .{ns ++ "wrapper/wrapper.c"};
step.addCSourceFiles(&files, &flags); step.addCSourceFiles(.{
.files = &files,
.flags = &flags,
});
step.addIncludePath(.{ .path = ns ++ "wrapper" }); step.addIncludePath(.{ .path = ns ++ "wrapper" });
} }

View File

@@ -45,7 +45,7 @@ pub const DOMException = struct {
// TODO: deinit // TODO: deinit
pub fn init(alloc: std.mem.Allocator, err: anyerror, callerName: []const u8) anyerror!DOMException { pub fn init(alloc: std.mem.Allocator, err: anyerror, callerName: []const u8) anyerror!DOMException {
const errCast = @as(parser.DOMError, @errSetCast(err)); const errCast = @as(parser.DOMError, @errorCast(err));
const errName = DOMException.name(errCast); const errName = DOMException.name(errCast);
const str = switch (errCast) { const str = switch (errCast) {
error.HierarchyRequest => try allocPrint( error.HierarchyRequest => try allocPrint(

View File

@@ -77,7 +77,7 @@ pub fn main() !void {
}; };
// server // server
var addr = try std.net.Address.initUnix(socket_path); const addr = try std.net.Address.initUnix(socket_path);
server = std.net.StreamServer.init(.{}); server = std.net.StreamServer.init(.{});
defer server.deinit(); defer server.deinit();
try server.listen(addr); try server.listen(addr);

View File

@@ -139,7 +139,7 @@ fn evalJS(env: jsruntime.Env, alloc: std.mem.Allocator, script: []const u8, name
// browse the path to find the tests list. // browse the path to find the tests list.
pub fn find(allocator: std.mem.Allocator, comptime path: []const u8, list: *std.ArrayList([]const u8)) !void { pub fn find(allocator: std.mem.Allocator, comptime path: []const u8, list: *std.ArrayList([]const u8)) !void {
var dir = try std.fs.cwd().openIterableDir(path, .{ .no_follow = true }); var dir = try std.fs.cwd().openDir(path, .{ .iterate = true, .no_follow = true });
defer dir.close(); defer dir.close();
var walker = try dir.walk(allocator); var walker = try dir.walk(allocator);