reserveNotes
Function parameters
Parameters
- wip:*Wip
- notes_len:u32
Type definitions in this namespace
Types
- ErrorMessageList
- There will be a MessageIndex for each len at start.
- SourceLocation
- Trailing:
- ErrorMessage
- Trailing:
Functions in this namespace
Functions
- nullTerminatedString
- Given an index into `string_bytes` returns the null-terminated string found there.
Special encoding when there are no errors.
Values
- empty
- Special encoding when there are no errors.
Source
Implementation
pub fn reserveNotes(wip: *Wip, notes_len: u32) !u32 {
try wip.extra.ensureUnusedCapacity(wip.gpa, notes_len +
notes_len * @typeInfo(ErrorBundle.ErrorMessage).@"struct".fields.len);
wip.extra.items.len += notes_len;
return @intCast(wip.extra.items.len - notes_len);
}