| ... | ... | @@ -66,6 +66,15 @@ pub fn print(comptime fmt: []const u8, args: anytype) void { |
| 66 | 66 | nosuspend stderr.print(fmt, args) catch return; |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | /// Indicates code that is unfinshed. It will throw a compiler error by default in Release mode. |
| 70 | /// This behaviour can be controlled with `root.allow_todo_in_release`. |
| 71 | pub fn todo(comptime desc: []const u8) noreturn { |
| 72 | if (builtin.mode != .Debug and !(@hasDecl(root, "allow_todo_in_release") and root.allow_todo_in_release)) { |
| 73 | @compileError("TODO: " ++ desc); |
| 74 | } |
| 75 | @panic("TODO: " ++ desc); |
| 76 | } |
| 77 | |
| 69 | 78 | pub fn getStderrMutex() *std.Thread.Mutex { |
| 70 | 79 | return &stderr_mutex; |
| 71 | 80 | } |