Skip to content

Commit 202dedf

Browse files
author
Lélahel
committed
zig api: small syntax improvement & typo fix
1 parent bd29e18 commit 202dedf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bindings/zig/examples/zig_api.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ const lm = @import("libremidi");
33

44

55
const EnumeratedPorts = extern struct {
6-
in_ports: [256]lm.midi.in.port.Handle = .{ lm.midi.in.port.Handle{} } ** 256,
7-
out_ports: [256]lm.midi.out.port.Handle = .{ lm.midi.out.port.Handle{} } ** 256,
6+
in_ports: [256]lm.midi.in.port.Handle = @splat(.{}),
7+
out_ports: [256]lm.midi.out.port.Handle = @splat(.{}),
88
in_port_count: usize = 0,
99
out_port_count: usize = 0,
1010
};
1111

1212
pub fn main() !void {
1313

14-
std.debug.print("Hello from midi Zig(ified) API example!\n", .{});
14+
std.debug.print("Hello from libremidi Zig(ified) API example!\n", .{});
1515
std.debug.print("libremidi version: {s}\n\n", .{ lm.getVersion() });
1616

1717
var e: EnumeratedPorts = .{};

0 commit comments

Comments
 (0)