diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-06-17 15:03:32 +0200 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-06-17 15:03:32 +0200 |
| commit | 34a7c6c8613fb0ba36b1be1f151c26226e40f332 (patch) | |
| tree | d93343ffda857f50e8acf2ad875552a2bb1e8292 /exercises | |
| parent | afaab2efca069cb4144d8bcb3a82ee042315ea6b (diff) | |
| parent | bc96d06da4d3400f40babd1de0eb0e100d734273 (diff) | |
Merge pull request 'Fixes the changes in zig's struct.fields' (#279) from i278 into main
Reviewed-on: https://codeberg.org/ziglings/exercises/pulls/279
Diffstat (limited to 'exercises')
| -rw-r--r-- | exercises/065_builtins2.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/exercises/065_builtins2.zig b/exercises/065_builtins2.zig index 6b8168c..067f07c 100644 --- a/exercises/065_builtins2.zig +++ b/exercises/065_builtins2.zig @@ -99,11 +99,15 @@ pub fn main() void { // 'fields' is a slice of StructFields. Here's the declaration: // // pub const StructField = struct { - // name: []const u8, + // name: [:0]const u8, // type: type, - // default_value: anytype, + // default_value_ptr: ?*const anyopaque, // is_comptime: bool, // alignment: comptime_int, + // + // defaultValue() ?sf.type // Function that loads the + // // field's default value from + // // `default_value_ptr` // }; // // Please complete these 'if' statements so that the field |
