From ca85cbf3b2c66b6d1d4e25c2a8ede3b09f19f854 Mon Sep 17 00:00:00 2001 From: Rylee Lyman Date: Wed, 3 Jul 2024 07:11:54 -0400 Subject: [PATCH] fix: use u64 for render_dur so that *Vaxis becomes align(8) on macOS, `@alignOf(std.c.max_align_t)` is 8, while `@alignOf(i128)` is 16. since we moved to using `std.time.Timer`, render duration should always be an unsigned quantity. this change is motivated by my seamstress project, which wants to use a Vaxis struct (well, something with a Vaxis struct as a field) as a Lua userdata. it turns out that Lua won't allocate at an alignment greater than `@alignOf(std.c.max_align_t)` even if you ask it to. --- src/Vaxis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Vaxis.zig b/src/Vaxis.zig index fc25ebe..8376cca 100644 --- a/src/Vaxis.zig +++ b/src/Vaxis.zig @@ -68,7 +68,7 @@ unicode: Unicode, // statistics renders: usize = 0, -render_dur: i128 = 0, +render_dur: u64 = 0, render_timer: std.time.Timer, sgr: enum {