std.macho: remove alignment from LoadCommandIterator

This commit is contained in:
Andrew Kelley 2023-10-03 14:54:32 -07:00
parent d8540dd708
commit 8ebebbd134
2 changed files with 3 additions and 3 deletions

View file

@ -539,7 +539,7 @@ const MachODumper = struct {
strings: []const u8,
};
fn parseAndDump(step: *Step, bytes: []align(@alignOf(u64)) const u8) ![]const u8 {
fn parseAndDump(step: *Step, bytes: []const u8) ![]const u8 {
const gpa = step.owner.allocator;
var stream = std.io.fixedBufferStream(bytes);
const reader = stream.reader();
@ -556,7 +556,7 @@ const MachODumper = struct {
var sections = std.ArrayList(macho.section_64).init(gpa);
var imports = std.ArrayList([]const u8).init(gpa);
var it = LoadCommandIterator{
var it: LoadCommandIterator = .{
.ncmds = hdr.ncmds,
.buffer = bytes[@sizeOf(macho.mach_header_64)..][0..hdr.sizeofcmds],
};

View file

@ -1853,7 +1853,7 @@ pub const data_in_code_entry = extern struct {
pub const LoadCommandIterator = struct {
ncmds: usize,
buffer: []align(@alignOf(u64)) const u8,
buffer: []const u8,
index: usize = 0,
pub const LoadCommand = struct {