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 Struct

Table

Private Struct
std.debug.Dwarf.Abbrev.Table
const Table = struct

Fields

offset: u64

offset from .debug_abbrev

abbrevs: []Abbrev

Functions

fn deinit(table: *Table, gpa: Allocator) void
fn get(table: *const Table, abbrev_code: u64) ?*const Abbrev

File

debug/Dwarf.zig:95
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
    const Table = struct {
        // offset from .debug_abbrev
        offset: u64,
        abbrevs: []Abbrev,

        fn deinit(table: *Table, gpa: Allocator) void {
            for (table.abbrevs) |*abbrev| {
                abbrev.deinit(gpa);
            }
            gpa.free(table.abbrevs);
            table.* = undefined;
        }

        fn get(table: *const Table, abbrev_code: u64) ?*const Abbrev {
            return for (table.abbrevs) |*abbrev| {
                if (abbrev.code == abbrev_code) break abbrev;
            } else null;
        }
    }