mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 03:44:46 +01:00
update root.os.system override to require "system" field, this allows easier overriding of os.heap.page_allocator
This commit is contained in:
parent
dd1fc1cb8c
commit
241e100827
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ test {
|
|||
/// Applications can override the `system` API layer in their root source file.
|
||||
/// Otherwise, when linking libc, this is the C API.
|
||||
/// When not linking libc, it is the OS-specific system interface.
|
||||
pub const system = if (@hasDecl(root, "os") and root.os != @This())
|
||||
pub const system = if (@hasDecl(root, "os") and @hasDecl(root.os, "system") and root.os != @This())
|
||||
root.os.system
|
||||
else if (use_libc)
|
||||
std.c
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue