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:
Stephen Gutekanst 2022-08-18 22:55:41 -07:00
parent 9406326cd8
commit 381f2fe9c5
6 changed files with 22 additions and 22 deletions

View file

@ -121,11 +121,11 @@ pub const Buffer = opaque {
) void {
const Context = @TypeOf(context);
const Helper = struct {
pub fn callback(status: MapAsyncStatus, userdata: ?*anyopaque) callconv(.C) void {
pub fn cCallback(status: MapAsyncStatus, userdata: ?*anyopaque) callconv(.C) void {
callback(if (Context == void) {} else @ptrCast(Context, @alignCast(@alignOf(std.meta.Child(Context)), userdata)), status);
}
};
Impl.bufferMapAsync(buffer, mode, offset, size, Helper.callback, if (Context == void) null else context);
Impl.bufferMapAsync(buffer, mode, offset, size, Helper.cCallback, if (Context == void) null else context);
}
pub inline fn setLabel(buffer: *Buffer, label: [*:0]const u8) void {