aboutsummaryrefslogtreecommitdiff
path: root/vendor/libghostty-vt/src/benchmark/CodepointWidth.zig
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-10 21:51:57 +0300
committerGitHub <noreply@github.com>2026-09-10 21:51:57 +0300
commit425c86179791cd32e2d4ce0ae7f269940b4b0663 (patch)
treee52c4383a6d69216cbe2a32638bf90841d7e2189 /vendor/libghostty-vt/src/benchmark/CodepointWidth.zig
parent90e947a6e26e02f10ec7f1694c4eb5b78a86406b (diff)
chore: upgrade libghostty and preserve terminal behavior (#3906)
Diffstat (limited to 'vendor/libghostty-vt/src/benchmark/CodepointWidth.zig')
-rw-r--r--vendor/libghostty-vt/src/benchmark/CodepointWidth.zig11
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/libghostty-vt/src/benchmark/CodepointWidth.zig b/vendor/libghostty-vt/src/benchmark/CodepointWidth.zig
index 30d3f91e..d0c6b808 100644
--- a/vendor/libghostty-vt/src/benchmark/CodepointWidth.zig
+++ b/vendor/libghostty-vt/src/benchmark/CodepointWidth.zig
@@ -14,13 +14,14 @@ const options = @import("options.zig");
const UTF8Decoder = @import("../terminal/UTF8Decoder.zig");
const simd = @import("../simd/main.zig");
const table = @import("../unicode/main.zig").table;
+const global = @import("../global.zig");
const log = std.log.scoped(.@"terminal-stream-bench");
opts: Options,
/// The file, opened in the setup function.
-data_f: ?std.fs.File = null,
+data_f: ?std.Io.File = null,
pub const Options = struct {
/// The type of codepoint width calculation to use.
@@ -93,7 +94,7 @@ fn setup(ptr: *anyopaque) Benchmark.Error!void {
fn teardown(ptr: *anyopaque) void {
const self: *CodepointWidth = @ptrCast(@alignCast(ptr));
if (self.data_f) |f| {
- f.close();
+ f.close(global.io());
self.data_f = null;
}
}
@@ -114,7 +115,7 @@ fn stepWcwidth(ptr: *anyopaque) Benchmark.Error!void {
const f = self.data_f orelse return;
var read_buf: [4096]u8 align(std.atomic.cache_line) = undefined;
- var f_reader = f.reader(&read_buf);
+ var f_reader = f.reader(global.io(), &read_buf);
var r = &f_reader.interface;
var d: UTF8Decoder = .{};
@@ -141,7 +142,7 @@ fn stepTable(ptr: *anyopaque) Benchmark.Error!void {
const f = self.data_f orelse return;
var read_buf: [4096]u8 align(std.atomic.cache_line) = undefined;
- var f_reader = f.reader(&read_buf);
+ var f_reader = f.reader(global.io(), &read_buf);
var r = &f_reader.interface;
var d: UTF8Decoder = .{};
@@ -173,7 +174,7 @@ fn stepSimd(ptr: *anyopaque) Benchmark.Error!void {
const f = self.data_f orelse return;
var read_buf: [4096]u8 align(std.atomic.cache_line) = undefined;
- var f_reader = f.reader(&read_buf);
+ var f_reader = f.reader(global.io(), &read_buf);
var r = &f_reader.interface;
var d: UTF8Decoder = .{};