diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-08-29 20:19:23 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-08-30 00:48:50 -0700 |
| commit | 9a0970a12bdcae105b6f3f65c0a72d95a209bd35 (patch) | |
| tree | ab0de8f2447b5e52c2bb5c92a976a52fb4b613ee /lib/compiler/std-docs.zig | |
| parent | 79f267f6b9e7f80a6fed3b1019f9de942841c3be (diff) | |
| download | zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.tar.gz zig-9a0970a12bdcae105b6f3f65c0a72d95a209bd35.zip | |
rework std.Io.Writer.Allocating to support runtime-known alignment
Also, breaking API changes to:
* std.fs.Dir.readFileAlloc
* std.fs.Dir.readFileAllocOptions
Diffstat (limited to 'lib/compiler/std-docs.zig')
| -rw-r--r-- | lib/compiler/std-docs.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/std-docs.zig b/lib/compiler/std-docs.zig index b708294836..b6696b5680 100644 --- a/lib/compiler/std-docs.zig +++ b/lib/compiler/std-docs.zig @@ -173,7 +173,7 @@ fn serveDocsFile( // The desired API is actually sendfile, which will require enhancing std.http.Server. // We load the file with every request so that the user can make changes to the file // and refresh the HTML page without restarting this server. - const file_contents = try context.lib_dir.readFileAlloc(gpa, name, 10 * 1024 * 1024); + const file_contents = try context.lib_dir.readFileAlloc(name, gpa, .limited(10 * 1024 * 1024)); defer gpa.free(file_contents); try request.respond(file_contents, .{ .extra_headers = &.{ @@ -263,7 +263,7 @@ fn serveWasm( }); // std.http.Server does not have a sendfile API yet. const bin_path = try wasm_base_path.join(arena, bin_name); - const file_contents = try bin_path.root_dir.handle.readFileAlloc(gpa, bin_path.sub_path, 10 * 1024 * 1024); + const file_contents = try bin_path.root_dir.handle.readFileAlloc(bin_path.sub_path, gpa, .limited(10 * 1024 * 1024)); defer gpa.free(file_contents); try request.respond(file_contents, .{ .extra_headers = &.{ |
