diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-10-23 13:58:49 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-10-29 06:20:51 -0700 |
| commit | 46f7e3ea9fff4b3f83cab58c20625d3961be6020 (patch) | |
| tree | c8cba4670ad23bc0c9a66d31b31ec5e847b0dc39 /lib/std/debug.zig | |
| parent | 701d4bc80b8cbb649364e8ecf86ed9cea8af739d (diff) | |
| download | zig-46f7e3ea9fff4b3f83cab58c20625d3961be6020.tar.gz zig-46f7e3ea9fff4b3f83cab58c20625d3961be6020.zip | |
std.Io.Threaded: add ioBasic which disables networking
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index a92a4b360f..616a524011 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -649,7 +649,7 @@ pub noinline fn captureCurrentStackTrace(options: StackUnwindOptions, addr_buf: /// See `captureCurrentStackTrace` to capture the trace addresses into a buffer instead of printing. pub noinline fn writeCurrentStackTrace(options: StackUnwindOptions, writer: *Writer, tty_config: tty.Config) Writer.Error!void { var threaded: Io.Threaded = .init_single_threaded; - const io = threaded.io(); + const io = threaded.ioBasic(); if (!std.options.allow_stack_tracing) { tty_config.setColor(writer, .dim) catch {}; @@ -780,7 +780,7 @@ pub fn writeStackTrace(st: *const StackTrace, writer: *Writer, tty_config: tty.C // We use an independent Io implementation here in case there was a problem // with the application's Io implementation itself. var threaded: Io.Threaded = .init_single_threaded; - const io = threaded.io(); + const io = threaded.ioBasic(); // Fetch `st.index` straight away. Aside from avoiding redundant loads, this prevents issues if // `st` is `@errorReturnTrace()` and errors are encountered while writing the stack trace. @@ -1602,7 +1602,7 @@ test "manage resources correctly" { }; const gpa = std.testing.allocator; var threaded: Io.Threaded = .init_single_threaded; - const io = threaded.io(); + const io = threaded.ioBasic(); var discarding: Io.Writer.Discarding = .init(&.{}); var di: SelfInfo = .init; defer di.deinit(gpa); |
