Track deprecating std.cstr namespace

This commit is contained in:
JimnwQ
2023-07-11 03:51:48 +09:00
committed by Isaac Freund
parent 000bf6f9ed
commit c2ae31892e

View File

@@ -15,7 +15,7 @@ pub fn main() !void {
fn listener(registry: *wl.Registry, event: wl.Registry.Event, running: *bool) void { fn listener(registry: *wl.Registry, event: wl.Registry.Event, running: *bool) void {
switch (event) { switch (event) {
.global => |global| { .global => |global| {
if (std.cstr.cmp(global.interface, wl.Seat.getInterface().name) == 0) { if (std.mem.orderZ(u8, global.interface, wl.Seat.getInterface().name) == .eq) {
const seat = registry.bind(global.name, wl.Seat, 1) catch return; const seat = registry.bind(global.name, wl.Seat, 1) catch return;
seat.setListener(*bool, seatListener, running); seat.setListener(*bool, seatListener, running);
} }