Zig 0.17.0-dev (Split by item)
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 library itself.
Zig › std/ › debug/ › MachOFile.zig › appendStabSymbol
appendStabSymbol
MachOFile.appendStabSymbol
fn appendStabSymbol (
symbols : *std .ArrayList (Symbol ),
symbol_names : *std .array_hash_map .String (void ),
strings : []const u8 ,
last_sym : Symbol ,
) void
File
Code
fn appendStabSymbol (
symbols : *std .ArrayList (Symbol ),
symbol_names : *std .array_hash_map .String (void ),
strings : []const u8 ,
last_sym : Symbol ,
) void {
const name = std .mem .sliceTo (strings [last_sym .strx ..], 0 );
const gop = symbol_names .getOrPutAssumeCapacity (name );
if (!gop .found_existing ) {
assert (gop .index == symbols .items .len );
symbols .appendAssumeCapacity (last_sym );
} else {
symbols .items [gop .index ] = last_sym ;
}
}