mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Fix src/Surface.zig
Change fastmem.copy to use memcpy builtin
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
.hash = "1220be2c7b3f3a07b9150720140c7038f454a9ce0cbc5d303767c1e4a50856ec1b01",
|
||||
},
|
||||
.mach_glfw = .{
|
||||
.url = "git+https://github.com/der-teufel-programming/mach-glfw#577220552e1b31c4496d2e0df2fb5fbc9287b966",
|
||||
.url = "https://github.com/der-teufel-programming/mach-glfw/archive/577220552e1b31c4496d2e0df2fb5fbc9287b966.tar.gz",
|
||||
.hash = "12204779ba2f14b46f569110f774d5c3f48b7a105b6717e668bc410710bceae62072",
|
||||
},
|
||||
.zig_objc = .{
|
||||
|
@ -2483,7 +2483,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool
|
||||
.text => |data| {
|
||||
// For text we always allocate just because its easier to
|
||||
// handle all cases that way.
|
||||
var buf = try self.alloc.alloc(u8, data.len);
|
||||
const buf = try self.alloc.alloc(u8, data.len);
|
||||
defer self.alloc.free(buf);
|
||||
const text = configpkg.string.parse(buf, data) catch |err| {
|
||||
log.warn(
|
||||
|
@ -18,7 +18,7 @@ pub inline fn copy(comptime T: type, dest: []T, source: []const T) void {
|
||||
if (builtin.link_libc) {
|
||||
_ = memcpy(dest.ptr, source.ptr, source.len * @sizeOf(T));
|
||||
} else {
|
||||
std.mem.copyForwards(T, dest, source);
|
||||
@memcpy(dest[0..source.len], source);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user