From 260b9effb19fe85604f05ccf0be18795fd2bc782 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 22 Sep 2023 14:27:12 +0200 Subject: all: fix build errors --- sdl2/rwops.ha | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sdl2/rwops.ha') diff --git a/sdl2/rwops.ha b/sdl2/rwops.ha index 4c9077b..4605a3a 100644 --- a/sdl2/rwops.ha +++ b/sdl2/rwops.ha @@ -15,8 +15,8 @@ export type rwops_type = enum u32 { export type SDL_RWops = struct { sz: *fn(ctx: *SDL_RWops) i64, seek: *fn(ctx: *SDL_RWops, offs: i64, whence: int) i64, - read: *fn(ctx: *SDL_RWops, ptr: *void, sz: size, maxnum: size) size, - write: *fn(ctx: *SDL_RWops, ptr: *const void, sz: size, num: size) size, + read: *fn(ctx: *SDL_RWops, ptr: *opaque, sz: size, maxnum: size) size, + write: *fn(ctx: *SDL_RWops, ptr: *const opaque, sz: size, num: size) size, close: *fn(ctx: *SDL_RWops) int, type_: rwops_type, @@ -24,7 +24,7 @@ export type SDL_RWops = struct { hidden: union { stdio: struct { autoclose: bool, - fp: nullable *void, // FILE * + fp: nullable *opaque, // FILE * }, mem: struct { base: nullable *u8, @@ -32,8 +32,8 @@ export type SDL_RWops = struct { stop: nullable *u8, }, unknown: struct { - data1: nullable *void, - data2: nullable *void, + data1: nullable *opaque, + data2: nullable *opaque, }, }, }; @@ -100,7 +100,7 @@ fn stream_seek(ctx: *SDL_RWops, offs: i64, whence: int) i64 = { }; }; -fn stream_read(ctx: *SDL_RWops, ptr: *void, sz: size, maxnum: size) size = { +fn stream_read(ctx: *SDL_RWops, ptr: *opaque, sz: size, maxnum: size) size = { const handle = *(&ctx.hidden.unknown.data1: *io::handle); let buf = ptr: *[*]u8; match (io::readall(handle, buf[..sz * maxnum])) { @@ -113,7 +113,7 @@ fn stream_read(ctx: *SDL_RWops, ptr: *void, sz: size, maxnum: size) size = { }; }; -fn stream_write(ctx: *SDL_RWops, ptr: *const void, sz: size, num: size) size = { +fn stream_write(ctx: *SDL_RWops, ptr: *const opaque, sz: size, num: size) size = { const handle = *(&ctx.hidden.unknown.data1: *io::handle); let buf = ptr: *[*]const u8; match (io::writeall(handle, buf[..sz * num])) { -- cgit v1.2.3