diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-02-28 03:07:11 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-02-28 03:07:11 -0500 |
| commit | 9eb29e81f956080b358a79d3567204f656350620 (patch) | |
| tree | 112ce872d3e8150cb7e624d314385fc058c6f50d /std/debug.zig | |
| parent | 1195994880b6a83e61807381df2721ac5256e876 (diff) | |
| download | zig-9eb29e81f956080b358a79d3567204f656350620.tar.gz zig-9eb29e81f956080b358a79d3567204f656350620.zip | |
rename CBuf to Buffer0 and some minor std API changes
Diffstat (limited to 'std/debug.zig')
| -rw-r--r-- | std/debug.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/debug.zig b/std/debug.zig index 2d30f2b540..d03f22b4c9 100644 --- a/std/debug.zig +++ b/std/debug.zig @@ -164,7 +164,7 @@ const Die = struct { }; fn getAttr(self: &const Die, id: u64) -> ?&const FormValue { - for (self.attrs.toSlice()) |*attr| { + for (self.attrs.toSliceConst()) |*attr| { if (attr.id == id) return &attr.value; } @@ -362,7 +362,7 @@ fn getAbbrevTable(st: &ElfStackTrace, abbrev_offset: u64) -> %&const AbbrevTable } fn getAbbrevTableEntry(abbrev_table: &const AbbrevTable, abbrev_code: u64) -> ?&const AbbrevTableEntry { - for (abbrev_table.toSlice()) |*table_entry| { + for (abbrev_table.toSliceConst()) |*table_entry| { if (table_entry.abbrev_code == abbrev_code) return table_entry; } @@ -379,7 +379,7 @@ fn parseDie(in_stream: &io.InStream, abbrev_table: &const AbbrevTable, is_64: bo .attrs = List(Die.Attr).init(&global_allocator), }; %return result.attrs.resize(table_entry.attrs.len); - for (table_entry.attrs.toSlice()) |attr, i| { + for (table_entry.attrs.toSliceConst()) |attr, i| { result.attrs.items[i] = Die.Attr { .id = attr.attr_id, .value = %return parseFormValue(in_stream, attr.form_id, is_64), |
