update to Zig 2024.10-mach (helps hexops/mach#1276)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
55e6abda61
commit
26c5cb5d60
28 changed files with 192 additions and 203 deletions
|
|
@ -34,7 +34,7 @@ const Lib = struct {
|
|||
|
||||
pub fn load() !void {
|
||||
lib.handle = std.DynLib.open("libpipewire-0.3.so") catch return error.LibraryNotFound;
|
||||
inline for (@typeInfo(Lib).Struct.fields[1..]) |field| {
|
||||
inline for (@typeInfo(Lib).@"struct".fields[1..]) |field| {
|
||||
const name = std.fmt.comptimePrint("{s}\x00", .{field.name});
|
||||
const name_z: [:0]const u8 = @ptrCast(name[0 .. name.len - 1]);
|
||||
@field(lib, field.name) = lib.handle.lookup(field.type, name_z) orelse return error.SymbolLookup;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue