mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +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
@ -9905,7 +9905,10 @@ const std = @import("std");
|
|||||||
const PreopenList = std.fs.wasi.PreopenList;
|
const PreopenList = std.fs.wasi.PreopenList;
|
||||||
|
|
||||||
pub fn main() !void {
|
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();
|
defer preopens.deinit();
|
||||||
|
|
||||||
try preopens.populate();
|
try preopens.populate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user