gpu: fix redeclaration of function parameter errors
This changed in the latest version of Zig to be more strict. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
9406326cd8
commit
381f2fe9c5
6 changed files with 22 additions and 22 deletions
|
|
@ -83,7 +83,7 @@ pub const Adapter = opaque {
|
|||
) void {
|
||||
const Context = @TypeOf(context);
|
||||
const Helper = struct {
|
||||
pub fn callback(status: RequestDeviceStatus, device: *Device, message: ?[*:0]const u8, userdata: ?*anyopaque) callconv(.C) void {
|
||||
pub fn cCallback(status: RequestDeviceStatus, device: *Device, message: ?[*:0]const u8, userdata: ?*anyopaque) callconv(.C) void {
|
||||
callback(
|
||||
if (Context == void) {} else @ptrCast(Context, @alignCast(@alignOf(Context), userdata)),
|
||||
status,
|
||||
|
|
@ -92,7 +92,7 @@ pub const Adapter = opaque {
|
|||
);
|
||||
}
|
||||
};
|
||||
Impl.adapterRequestDevice(adapter, descriptor, Helper.callback, if (Context == void) null else context);
|
||||
Impl.adapterRequestDevice(adapter, descriptor, Helper.cCallback, if (Context == void) null else context);
|
||||
}
|
||||
|
||||
pub inline fn reference(adapter: *Adapter) void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue