diff --git a/flake.lock b/flake.lock index f93fe7de5..1e929ad21 100644 --- a/flake.lock +++ b/flake.lock @@ -109,11 +109,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1670113356, - "narHash": "sha256-43aMRMU0OuBin6M2LM+nxVG+whazyHuHnUvu92xoth0=", + "lastModified": 1670908544, + "narHash": "sha256-SBlApO9OAnH2q4RqCHl8a2vZWhz/WAh+iojVM/k3bQ8=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "17352071583eda4be43fa2a312f6e061326374f7", + "rev": "066597fa3ed09d9c507f46a5850a392f451ef6cd", "type": "github" }, "original": { diff --git a/pkg/harfbuzz/blob.zig b/pkg/harfbuzz/blob.zig index b7dde9c83..071a4da88 100644 --- a/pkg/harfbuzz/blob.zig +++ b/pkg/harfbuzz/blob.zig @@ -77,7 +77,7 @@ pub const Blob = struct { comptime T: type, key: ?*anyopaque, ptr: ?*T, - comptime destroycb: ?std.meta.FnPtr(fn (?*T) callconv(.C) void), + comptime destroycb: ?*const fn (?*T) callconv(.C) void, replace: bool, ) bool { const Callback = struct { diff --git a/pkg/libuv/Embed.zig b/pkg/libuv/Embed.zig index 371517a19..4245f16cf 100644 --- a/pkg/libuv/Embed.zig +++ b/pkg/libuv/Embed.zig @@ -23,7 +23,7 @@ mutex: Mutex, cond: Cond, ready: bool = false, terminate: BoolAtomic, -callback: std.meta.FnPtr(fn () void), +callback: *const fn () void, thread: ?Thread, /// Initialize a new embedder. The callback is called when libuv should @@ -31,7 +31,7 @@ thread: ?Thread, pub fn init( alloc: Allocator, loop: Loop, - callback: std.meta.FnPtr(fn () void), + callback: *const fn () void, ) !Embed { return Embed{ .loop = loop, diff --git a/pkg/objc/msg_send.zig b/pkg/objc/msg_send.zig index d7334a27f..21551285f 100644 --- a/pkg/objc/msg_send.zig +++ b/pkg/objc/msg_send.zig @@ -79,7 +79,7 @@ pub fn MsgSend(comptime T: type) type { const Fn = MsgSendFn(RealReturn, @TypeOf(target.value), @TypeOf(args)); // Due to this stage2 Zig issue[1], this must be var for now. // [1]: https://github.com/ziglang/zig/issues/13598 - var msg_send_ptr = @ptrCast(std.meta.FnPtr(Fn), msg_send_fn); + var msg_send_ptr = @ptrCast(*const Fn, msg_send_fn); const result = @call(.{}, msg_send_ptr, .{ target.value, sel.value } ++ args); if (!is_object) return result; diff --git a/src/font/face/freetype_convert.zig b/src/font/face/freetype_convert.zig index 616446027..a53518f2f 100644 --- a/src/font/face/freetype_convert.zig +++ b/src/font/face/freetype_convert.zig @@ -17,7 +17,7 @@ pub const Map = [freetype.c.FT_PIXEL_MODE_MAX]AtlasArray; /// to be exactly `width * rows * depth` long for freeing it. The caller must /// free the bitmap buffer. The depth is the depth of the atlas format in the /// map. -pub const Func = std.meta.FnPtr(fn (Allocator, Bitmap) Allocator.Error!Bitmap); +pub const Func = *const fn (Allocator, Bitmap) Allocator.Error!Bitmap; /// Alias for the freetype FT_Bitmap type to make it easier to type. pub const Bitmap = freetype.c.struct_FT_Bitmap_; diff --git a/src/renderer/opengl/glad.zig b/src/renderer/opengl/glad.zig index 4ab3e6642..3ee52431e 100644 --- a/src/renderer/opengl/glad.zig +++ b/src/renderer/opengl/glad.zig @@ -13,13 +13,13 @@ pub threadlocal var context: Context = undefined; /// The getProcAddress param is an anytype so that we can accept multiple /// forms of the function depending on what we're interfacing with. pub fn load(getProcAddress: anytype) !c_int { - const GlProc = std.meta.FnPtr(fn () callconv(.C) void); - const GlfwFn = std.meta.FnPtr(fn ([*:0]const u8) callconv(.C) ?GlProc); + const GlProc = *const fn () callconv(.C) void; + const GlfwFn = *const fn ([*:0]const u8) callconv(.C) ?GlProc; const res = switch (@TypeOf(getProcAddress)) { // glfw GlfwFn => c.gladLoadGLContext(&context, @ptrCast( - std.meta.FnPtr(fn ([*c]const u8) callconv(.C) ?GlProc), + *const fn ([*c]const u8) callconv(.C) ?GlProc, getProcAddress, )),