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 standard library.
std › zig › llvm › BitcodeReader › Block Public Struct Block Doc Source Public Struct std.zig.llvm.BitcodeReader.Block
pub const Block = struct Fields name : []const u8 id : u32 len : u32 Structs Values File zig/llvm/BitcodeReader.zig: 21
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 pub const Block = struct {
name : []const u8 ,
id : u32 ,
len : u32 ,
const block_info : u32 = 0 ;
const first_reserved : u32 = 1 ;
const last_standard : u32 = 7 ;
const Info = struct {
block_name : []const u8 ,
record_names : std .AutoHashMapUnmanaged (u32 , []const u8 ),
abbrevs : Abbrev .Store ,
const default : Info = .{
.block_name = &.{},
.record_names = .empty ,
.abbrevs = .{ .abbrevs = .empty },
};
const set_bid_id : u32 = 1 ;
const block_name_id : u32 = 2 ;
const set_record_name_id : u32 = 3 ;
fn deinit (info : *Info , allocator : std .mem .Allocator ) void {
allocator .free (info .block_name );
var record_names_it = info .record_names .valueIterator ();
while (record_names_it .next ()) |record_name | allocator .free (record_name .*);
info .record_names .deinit (allocator );
info .abbrevs .deinit (allocator );
info .* = undefined ;
}
};
}