From 7cd8f4c8c49666315504881559cb3a070fb4feb0 Mon Sep 17 00:00:00 2001 From: Mason Remaley Date: Sun, 9 Mar 2025 13:39:56 -0700 Subject: [PATCH] Works around json parser bug --- src/generate.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/generate.zig b/src/generate.zig index 8fbbc52..9392253 100644 --- a/src/generate.zig +++ b/src/generate.zig @@ -134,7 +134,9 @@ const Header = struct { const Description = struct { kind: enum { Type, Function, Array, Pointer, Builtin, User }, - storage_classes: []const enum { @"const" } = &.{}, + // We explicitly set the enum size to u8 as a workaround for + // https://github.com/ziglang/zig/issues/23168 + storage_classes: []const enum(u8) { @"const" } = &.{}, inner_type: ?*Description = null, bounds: ?[]const u8 = null, // Literal or variable builtin_type: ?Builtin = null,