mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 13:54:21 +00:00
Update WASI preopens doc section to use GPA
Signed-off-by: Jakub Konka <kubkon@jakubkonka.com>
This commit is contained in:
parent
a31b70c4b8
commit
53c63bdb73
1 changed files with 4 additions and 1 deletions
|
|
@ -9905,7 +9905,10 @@ const std = @import("std");
|
|||
const PreopenList = std.fs.wasi.PreopenList;
|
||||
|
||||
pub fn main() !void {
|
||||
var preopens = PreopenList.init(std.heap.page_allocator);
|
||||
var general_purpose_allocator = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
const gpa = &general_purpose_allocator.allocator;
|
||||
|
||||
var preopens = PreopenList.init(gpa);
|
||||
defer preopens.deinit();
|
||||
|
||||
try preopens.populate();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue