From 451e1a373969f81fb63223e10b1d69ba7dac3523 Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Tue, 17 Jun 2025 14:07:31 +0200 Subject: Fixes the changes in zig's struct.fields --- exercises/065_builtins2.zig | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'exercises/065_builtins2.zig') 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 -- cgit v1.2.3