From 887eac0219345763f1ae9c8d9efad6950f6bbfe6 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Sun, 4 Aug 2019 16:27:36 +1000 Subject: [PATCH] std: remove elf.auto_close_stream and elf.prealloc_file --- std/elf.zig | 5 ----- 1 file changed, 5 deletions(-) diff --git a/std/elf.zig b/std/elf.zig index 0b3ea203989080a3c0ef45956a6cd40df5f01586..37635895fd226d588e70505094a47dbd6484617c 100644 --- a/std/elf.zig +++ b/std/elf.zig @@ -356,7 +356,6 @@ pub const SectionHeader = struct { pub const Elf = struct { seekable_stream: *io.SeekableStream(anyerror, anyerror), in_stream: *io.InStream(anyerror), - auto_close_stream: bool, is_64: bool, endian: builtin.Endian, file_type: FileType, @@ -368,7 +367,6 @@ pub const Elf = struct { string_section: *SectionHeader, section_headers: []SectionHeader, allocator: *mem.Allocator, - prealloc_file: File, /// Call close when done. pub fn openPath(allocator: *mem.Allocator, path: []const u8) !Elf { @@ -386,7 +384,6 @@ pub const Elf = struct { in: *io.InStream(anyerror), ) !Elf { var elf: Elf = undefined; - elf.auto_close_stream = false; elf.allocator = allocator; elf.seekable_stream = seekable_stream; elf.in_stream = in; @@ -529,8 +526,6 @@ pub const Elf = struct { pub fn close(elf: *Elf) void { elf.allocator.free(elf.section_headers); - - if (elf.auto_close_stream) elf.prealloc_file.close(); } pub fn findSection(elf: *Elf, name: []const u8) !?*SectionHeader { -- 2.54.0