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. Private Function

appendStabSymbol

Private Function
std.debug.MachOFile.appendStabSymbol
fn appendStabSymbol(
    symbols: *std.ArrayList(Symbol),
    symbol_names: *std.array_hash_map.String(void),
    strings: []const u8,
    last_sym: Symbol,
) void

Params

File

debug/MachOFile.zig:370
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
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;
    }
}