glfw: Use anyopaque instead of opaque{}
Using an inline `opaque{}` type forces the use of `@typeInfo` to cast to the specific type of the parameter.
This commit is contained in:
parent
abe9475d6e
commit
d651d25903
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ pub const VKProc = fn () callconv(.C) void;
|
|||
/// @pointer_lifetime The returned function pointer is valid until the library is terminated.
|
||||
///
|
||||
/// @thread_safety This function may be called from any thread.
|
||||
pub fn getInstanceProcAddress(vk_instance: ?*opaque {}, proc_name: [*:0]const u8) callconv(.C) ?VKProc {
|
||||
pub fn getInstanceProcAddress(vk_instance: ?*anyopaque, proc_name: [*:0]const u8) callconv(.C) ?VKProc {
|
||||
internal_debug.assertInitialized();
|
||||
const proc_address = c.glfwGetInstanceProcAddress(if (vk_instance) |v| @ptrCast(c.VkInstance, v) else null, proc_name);
|
||||
getError() catch |err| @panic(@errorName(err));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue