authorgravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-08-04 16:27:36+10:00
committergravatar for quae@daurnimator.comdaurnimator <quae@daurnimator.com> 2019-08-04 16:27:36+10:00
log887eac0219345763f1ae9c8d9efad6950f6bbfe6
tree181b5e8e8849fbceebe37246c1d3d3471a3720e5
parent521aaf350185b5f01816b7a9ec604335edb3ac16
signature Commit is signed but in an unrecognized format.

std: remove elf.auto_close_stream and elf.prealloc_file


1 files changed, 0 insertions(+), 5 deletions(-)

std/elf.zig-5
......@@ -356,7 +356,6 @@ pub const SectionHeader = struct {
356356pub const Elf = struct {
357357 seekable_stream: *io.SeekableStream(anyerror, anyerror),
358358 in_stream: *io.InStream(anyerror),
359 auto_close_stream: bool,
360359 is_64: bool,
361360 endian: builtin.Endian,
362361 file_type: FileType,
......@@ -368,7 +367,6 @@ pub const Elf = struct {
368367 string_section: *SectionHeader,
369368 section_headers: []SectionHeader,
370369 allocator: *mem.Allocator,
371 prealloc_file: File,
372370
373371 /// Call close when done.
374372 pub fn openPath(allocator: *mem.Allocator, path: []const u8) !Elf {
......@@ -386,7 +384,6 @@ pub const Elf = struct {
386384 in: *io.InStream(anyerror),
387385 ) !Elf {
388386 var elf: Elf = undefined;
389 elf.auto_close_stream = false;
390387 elf.allocator = allocator;
391388 elf.seekable_stream = seekable_stream;
392389 elf.in_stream = in;
......@@ -529,8 +526,6 @@ pub const Elf = struct {
529526
530527 pub fn close(elf: *Elf) void {
531528 elf.allocator.free(elf.section_headers);
532
533 if (elf.auto_close_stream) elf.prealloc_file.close();
534529 }
535530
536531 pub fn findSection(elf: *Elf, name: []const u8) !?*SectionHeader {