diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-03-14 21:04:11 +0000 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-03-14 21:04:11 +0000 |
| commit | 02edb1f5c602ca6e22efc78627c40c428aeeadc6 (patch) | |
| tree | b79802d8d823fa96e5afc30e46d062db249b20c1 | |
| parent | 1a9b7ec3427dac2a802183a202b041fa6d41662e (diff) | |
| parent | 5734e68789863805e2bf02dc291d62c315a324ce (diff) | |
Merge branch 'main' into patch_rectify
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | exercises/082_anonymous_structs3.zig | 6 | ||||
| -rw-r--r-- | patches/patches/082_anonymous_structs3.patch | 6 |
3 files changed, 8 insertions, 5 deletions
@@ -233,6 +233,7 @@ Zig Core Language * [X] Interfaces * [X] Bit manipulation * [X] Working with C +* [ ] Opaque types (anyopaque) * [X] Threading * [x] Labeled switch * [x] Vector operations (SIMD) diff --git a/exercises/082_anonymous_structs3.zig b/exercises/082_anonymous_structs3.zig index 573d0bb..469cd66 100644 --- a/exercises/082_anonymous_structs3.zig +++ b/exercises/082_anonymous_structs3.zig @@ -95,13 +95,15 @@ fn printTuple(tuple: anytype) void { // Each 'field' in this loop is one of these: // // 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, // }; // + // Note we will learn about 'anyopaque' type later + // // You'll need this builtin: // // @field(lhs: anytype, comptime field_name: []const u8) diff --git a/patches/patches/082_anonymous_structs3.patch b/patches/patches/082_anonymous_structs3.patch index b918011..0f71a94 100644 --- a/patches/patches/082_anonymous_structs3.patch +++ b/patches/patches/082_anonymous_structs3.patch @@ -1,5 +1,5 @@ ---- exercises/082_anonymous_structs3.zig 2024-09-07 19:13:58.210327580 +0200 -+++ answers/082_anonymous_structs3.zig 2024-09-07 19:21:20.972733477 +0200 +--- exercises/082_anonymous_structs3.zig 2025-03-14 16:41:17.892873287 +0200 ++++ answers/082_anonymous_structs3.zig 2025-03-14 16:40:56.043829543 +0200 @@ -82,14 +82,14 @@ // @typeInfo(Circle).@"struct".fields // @@ -17,7 +17,7 @@ // 3. Print the field's name, type, and value. // // Each 'field' in this loop is one of these: -@@ -117,9 +117,9 @@ +@@ -119,9 +119,9 @@ // // The first field should print as: "0"(bool):true print("\"{s}\"({any}):{any} ", .{ |
