Skip to content

Commit 27354db

Browse files
committed
Parameterize Sections on the type of ObjectHandle
1 parent efe19b1 commit 27354db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ObjFileBase.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export printfield, printentry, printfield_with_color, deref,
88
load_strtab, readmeta, StrTab, symname, Sections, symbolvalue,
99
isundef
1010

11-
import Base: read, seek, readbytes, position, show, showcompact
11+
import Base: read, seek, readbytes, position, show, showcompact, readuntil
1212

1313
########## ObjFileBase.jl - Basic shared functionality for all object files ####
1414
#
@@ -112,7 +112,7 @@ end
112112
# end
113113
##
114114

115-
abstract Sections
115+
abstract Sections{T<:ObjectHandle}
116116
abstract SectionRef{T<:ObjectHandle}
117117
abstract Section{T<:ObjectHandle}
118118
abstract Relocation{T<:ObjectHandle}
@@ -338,6 +338,7 @@ readmeta(file::AbstractString) = readmeta(open(file,"r"))
338338

339339
read{T<:ObjectHandle}(oh::T, args...) = read(oh.io,args...)
340340
read{H<:ObjectHandle,T}(oh::H, ::Type{T}) = read(oh.io, T)::T
341+
readuntil{H<:ObjectHandle}(oh::H, x) = readuntil(oh.io, x)
341342

342343
# Others
343344

0 commit comments

Comments
 (0)