| author | |
| committer | |
| log | c1c6f082961a2735ff3c91167f0e1bcfcfcc2010 |
| tree | 295e1913a4b61cbce1106468dfd861c956cb91d4 |
| parent | 344db9e26bfb7a966cb99d73fa13c7d6845c2ce9 |
| signature |
4 files changed, 4 insertions(+), 1 deletions(-)
lib/std/Build/Step/ConfigHeader.zig+1-1| ... | ... | @@ -131,7 +131,7 @@ fn putValue(config_header: *ConfigHeader, field_name: []const u8, comptime T: ty |
| 131 | 131 | .comptime_int => { |
| 132 | 132 | try config_header.values.put(field_name, .{ .int = v }); |
| 133 | 133 | }, |
| 134 | .enum_literal => { | |
| 134 | .@"enum", .enum_literal => { | |
| 135 | 135 | try config_header.values.put(field_name, .{ .ident = @tagName(v) }); |
| 136 | 136 | }, |
| 137 | 137 | .optional => { |
test/standalone/config_header/build.zig+1| ... | ... | @@ -10,6 +10,7 @@ pub fn build(b: *std.Build) void { |
| 10 | 10 | .SOME_ZERO = 0, |
| 11 | 11 | .SOME_ONE = 1, |
| 12 | 12 | .SOME_TEN = 10, |
| 13 | .SOME_ENUM = @as(enum { foo, bar }, .foo), | |
| 13 | 14 | .SOME_ENUM_LITERAL = .@"test", |
| 14 | 15 | .SOME_STRING = "test", |
| 15 | 16 |
test/standalone/config_header/config.h+1| ... | ... | @@ -9,6 +9,7 @@ int foo(); |
| 9 | 9 | #define SOME_ZERO 0 |
| 10 | 10 | #define SOME_ONE 1 |
| 11 | 11 | #define SOME_TEN 10 |
| 12 | #define SOME_ENUM foo | |
| 12 | 13 | #define SOME_ENUM_LITERAL test |
| 13 | 14 | #define SOME_STRING "test" |
| 14 | 15 |
test/standalone/config_header/config.h.in+1| ... | ... | @@ -8,6 +8,7 @@ int foo(); |
| 8 | 8 | #undef SOME_ZERO |
| 9 | 9 | #undef SOME_ONE |
| 10 | 10 | #undef SOME_TEN |
| 11 | #undef SOME_ENUM | |
| 11 | 12 | #undef SOME_ENUM_LITERAL |
| 12 | 13 | #undef SOME_STRING |
| 13 | 14 |