summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jared Baur2025-12-02 23:47:10 -0800
committerGravatar Komari Spaghetti2025-12-04 21:52:04 +0100
commit3ae92228409d82a2c906fafc228b7920d9ff046b (patch)
treee3bf40bc3137465a678367ebe7387755c9dbf83a
parentfix: Use the new @Struct and @Tuple constructors (diff)
downloadzig-clap-master.tar.gz
zig-clap-master.tar.xz
zig-clap-master.zip
fix: enable building on 32-bit platformsHEADmaster
Without this change, we get the following error when targeting 32bit platforms (e.g. arm-linux): "@fieldParentPtr increases pointer alignment".
Diffstat (limited to '')
-rw-r--r--clap/codepoint_counting_writer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/clap/codepoint_counting_writer.zig b/clap/codepoint_counting_writer.zig
index 3518d48..39d5666 100644
--- a/clap/codepoint_counting_writer.zig
+++ b/clap/codepoint_counting_writer.zig
@@ -17,7 +17,7 @@ pub const CodepointCountingWriter = struct {
17 } 17 }
18 18
19 fn drain(w: *std.Io.Writer, data: []const []const u8, splat: usize) std.Io.Writer.Error!usize { 19 fn drain(w: *std.Io.Writer, data: []const []const u8, splat: usize) std.Io.Writer.Error!usize {
20 const self: *Self = @fieldParentPtr("interface", w); 20 const self: *Self = @alignCast(@fieldParentPtr("interface", w));
21 var n_bytes_written: usize = 0; 21 var n_bytes_written: usize = 0;
22 var i: usize = 0; 22 var i: usize = 0;
23 23