Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

stackGrowth

Public Function
std.Target.stackGrowth
pub fn stackGrowth(target: *const Target) StackGrowth

Params

File

Target.zig:3133
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
pub fn stackGrowth(target: *const Target) StackGrowth {
    // Strictly speaking, most architectures don't inherently define the stack growth direction; you
    // could quite easily argue that it is in fact a property of the ABI. However, that's just not
    // really how it plays out in the real world. And besides, we have no mechanism for indicating
    // a different stack growth ABI, nor a compelling use case for creating such a mechanism.
    return switch (target.cpu.arch) {
        .hppa,
        .hppa64,
        .spork8,
        => .up,
        else => .down,
    };
}