| ... | ... | @@ -356,7 +356,6 @@ pub const SectionHeader = struct { |
| 356 | 356 | pub const Elf = struct { |
| 357 | 357 | seekable_stream: *io.SeekableStream(anyerror, anyerror), |
| 358 | 358 | in_stream: *io.InStream(anyerror), |
| 359 | | auto_close_stream: bool, |
| 360 | 359 | is_64: bool, |
| 361 | 360 | endian: builtin.Endian, |
| 362 | 361 | file_type: FileType, |
| ... | ... | @@ -368,7 +367,6 @@ pub const Elf = struct { |
| 368 | 367 | string_section: *SectionHeader, |
| 369 | 368 | section_headers: []SectionHeader, |
| 370 | 369 | allocator: *mem.Allocator, |
| 371 | | prealloc_file: File, |
| 372 | 370 | |
| 373 | 371 | /// Call close when done. |
| 374 | 372 | pub fn openPath(allocator: *mem.Allocator, path: []const u8) !Elf { |
| ... | ... | @@ -386,7 +384,6 @@ pub const Elf = struct { |
| 386 | 384 | in: *io.InStream(anyerror), |
| 387 | 385 | ) !Elf { |
| 388 | 386 | var elf: Elf = undefined; |
| 389 | | elf.auto_close_stream = false; |
| 390 | 387 | elf.allocator = allocator; |
| 391 | 388 | elf.seekable_stream = seekable_stream; |
| 392 | 389 | elf.in_stream = in; |
| ... | ... | @@ -529,8 +526,6 @@ pub const Elf = struct { |
| 529 | 526 | |
| 530 | 527 | pub fn close(elf: *Elf) void { |
| 531 | 528 | elf.allocator.free(elf.section_headers); |
| 532 | | |
| 533 | | if (elf.auto_close_stream) elf.prealloc_file.close(); |
| 534 | 529 | } |
| 535 | 530 | |
| 536 | 531 | pub fn findSection(elf: *Elf, name: []const u8) !?*SectionHeader { |