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

getSections

Public Function
std.macho.LoadCommandIterator.LoadCommand.getSections
pub fn getSections(lc: LoadCommand) []align(1) const section_64

Asserts LoadCommand is of type segment_command_64. If the native endian is not .little, the section_64 values must be byte-swapped by the caller.

Params

File

macho.zig:1954
1954
1955
1956
1957
1958
        pub fn getSections(lc: LoadCommand) []align(1) const section_64 {
            const segment_lc = lc.cast(segment_command_64).?;
            const sects_ptr: [*]align(1) const section_64 = @ptrCast(lc.data[@sizeOf(segment_command_64)..]);
            return sects_ptr[0..segment_lc.nsects];
        }