diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-01-03 19:37:11 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-01-05 02:31:29 -0700 |
| commit | f83834993e2628e347da71a11ffb07c804fc46c5 (patch) | |
| tree | 21fd10b3ba19c4236326549872a202a4ffe29b3f /lib/std/start.zig | |
| parent | fe2bd9dda8467b775da4fe3bd535aece9e07ee1b (diff) | |
| download | zig-f83834993e2628e347da71a11ffb07c804fc46c5.tar.gz zig-f83834993e2628e347da71a11ffb07c804fc46c5.zip | |
std: collect all options under one namespace
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index 1a223b9a21..8aef63332d 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -527,7 +527,7 @@ const bad_main_ret = "expected return type of main to be 'void', '!void', 'noret // and we want fewer call frames in stack traces. inline fn initEventLoopAndCallMain() u8 { if (std.event.Loop.instance) |loop| { - if (!@hasDecl(root, "event_loop")) { + if (loop == std.event.Loop.default_instance) { loop.init() catch |err| { std.log.err("{s}", .{@errorName(err)}); if (@errorReturnTrace()) |trace| { @@ -556,7 +556,7 @@ inline fn initEventLoopAndCallMain() u8 { // because it is working around stage1 compiler bugs. inline fn initEventLoopAndCallWinMain() std.os.windows.INT { if (std.event.Loop.instance) |loop| { - if (!@hasDecl(root, "event_loop")) { + if (loop == std.event.Loop.default_instance) { loop.init() catch |err| { std.log.err("{s}", .{@errorName(err)}); if (@errorReturnTrace()) |trace| { |
