mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 05:20:29 +00:00
windows: avoid the use of wcwidth
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
const CodepointWidth = @This();
|
||||
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Benchmark = @import("Benchmark.zig");
|
||||
@@ -104,6 +105,11 @@ fn stepNoop(ptr: *anyopaque) Benchmark.Error!void {
|
||||
extern "c" fn wcwidth(c: u32) c_int;
|
||||
|
||||
fn stepWcwidth(ptr: *anyopaque) Benchmark.Error!void {
|
||||
if (comptime builtin.os.tag == .windows) {
|
||||
log.warn("wcwidth is not available on Windows", .{});
|
||||
return;
|
||||
}
|
||||
|
||||
const self: *CodepointWidth = @ptrCast(@alignCast(ptr));
|
||||
|
||||
const f = self.data_f orelse return;
|
||||
|
||||
Reference in New Issue
Block a user