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/ › Pdb.zig › getBinaryAnnotations
getBinaryAnnotations
Pdb.getBinaryAnnotations
pub fn getBinaryAnnotations (self : *Pdb , module : *Module , site : *align (1 ) const pdb .InlineSiteSym ) BinaryAnnotation .Iterator
File
Code
pub fn getBinaryAnnotations (self : *Pdb , module : *Module , site : *align (1 ) const pdb .InlineSiteSym ) BinaryAnnotation .Iterator {
_ = self ;
var start : usize = @intFromPtr (site ) + @sizeOf (pdb .InlineSiteSym );
var end = start + site .record_len + @sizeOf (u16 ) - @sizeOf (pdb .InlineSiteSym );
switch (site .record_kind ) {
.inlinesite => {},
.inlinesite2 => start += @sizeOf (pdb .InlineSiteSym2 ) - @sizeOf (pdb .InlineSiteSym ),
else => end = start ,
}
if (start < @intFromPtr (module .symbols .ptr ) or end > @intFromPtr (module .symbols .ptr ) + module .symbols .len ) return .empty ;
const len = end - start ;
const ptr : [*]const u8 = @ptrFromInt (start );
const slice = ptr [0 ..len ];
return .{ .reader = Io .Reader .fixed (slice ) };
}