From e968e6d00473a0fb9de86ae99400503e4e40f0ef Mon Sep 17 00:00:00 2001 From: Mason Remaley Date: Sun, 12 Apr 2026 14:09:22 -0700 Subject: [PATCH] Fixes typos/out of date comments, switches to unstable sort --- lib/std/debug.zig | 2 -- lib/std/debug/Pdb.zig | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/std/debug.zig b/lib/std/debug.zig index e38741e43caa1c177af3d9035ac333aa46b2bf8d..80dfb144597bf1db1cc41e81183a09a2a4a0f489 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -606,8 +606,6 @@ fn waitForOtherThreadToFinishPanicking() void { } } -/// This data structure is used by the Zig language code generation and -/// therefore must be kept in sync with the compiler implementation. pub const StackTrace = struct { /// Each element is the "return address" of a function call, meaning the instruction address /// which control flow will return to when the function returns. diff --git a/lib/std/debug/Pdb.zig b/lib/std/debug/Pdb.zig index 3f41e0885d324d349e656729062ebb6599ec5a0d..59a16968ff95e95ce86c0f4e1aca972677a3a26d 100644 --- a/lib/std/debug/Pdb.zig +++ b/lib/std/debug/Pdb.zig @@ -518,7 +518,7 @@ pub const BinaryAnnotation = union(enum) { } } - // Adapated from: + // Adapted from: // https://github.com/microsoft/microsoft-pdb/blob/805655a28bd8198004be2ac27e6e0290121a5e89/include/cvinfo.h#L4942 pub fn takePackedU32(reader: *Io.Reader) Io.Reader.Error!u32 { const b0: u32 = try reader.takeByte(); @@ -866,7 +866,7 @@ pub fn getModule(self: *Pdb, index: usize) !?*Module { } } - std.mem.sort(InlineeSourceLine, inlinee_source_lines.items, {}, InlineeSourceLine.lessThan); + std.mem.sortUnstable(InlineeSourceLine, inlinee_source_lines.items, {}, InlineeSourceLine.lessThan); break :b try inlinee_source_lines.toOwnedSlice(gpa); }; errdefer gpa.free(mod.inlinee_source_lines); -- 2.54.0