From e1c1f5d687930db36ae03f5fa2ce45d15e7ddbb5 Mon Sep 17 00:00:00 2001 From: "Wrench[bot]" Date: Mon, 30 Dec 2024 12:28:08 -0700 Subject: [PATCH 1/2] all: update Zig to version 0.14.0-dev.2577+271452d22 Signed-off-by: Wrench[bot] --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd97a9c..52d22e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: - name: Setup Zig run: | sudo apt install xz-utils - sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.1911+3bf89f55c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' + sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' - name: x86_64-linux -> aarch64-macos run: zig build -Dtarget=aarch64-macos # TODO: re-enable this, unsure why it is failing during cross-compilation: @@ -25,10 +25,10 @@ jobs: # - name: Setup Zig # run: | # $ProgressPreference = 'SilentlyContinue' - # Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.1911+3bf89f55c.zip" -OutFile "C:\zig.zip" + # Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.2577+271452d22.zip" -OutFile "C:\zig.zip" # cd C:\ # 7z x zig.zip - # Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.1911+3bf89f55c\" + # Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.2577+271452d22\" # - name: x86_64-windows -> aarch64-macos # run: zig build -Dtarget=aarch64-macos x86_64-macos: @@ -39,6 +39,6 @@ jobs: - name: Setup Zig run: | brew install xz - sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.14.0-dev.1911+3bf89f55c.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' + sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-macos-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' - name: build run: zig build From ec00e3f84db4f6668c396da2d404d37522671d3d Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 30 Dec 2024 17:00:05 -0700 Subject: [PATCH 2/2] update to latest zig version Signed-off-by: Stephen Gutekanst --- generator.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/generator.zig b/generator.zig index 78b21fd..b55671d 100644 --- a/generator.zig +++ b/generator.zig @@ -480,14 +480,12 @@ pub const Parser = struct { const return_type = try self.allocator.create(Type); return_type.* = .{ .void = {} }; - const ty = .{ + return self.parseTypeSuffix(.{ .function = .{ .return_type = return_type, .params = std.ArrayList(Type).init(self.allocator), }, - }; - - return self.parseTypeSuffix(ty, is_const, true); + }, is_const, true); }, .kw_instancetype => { try self.match(.kw_instancetype);