Skip to content

Commit 9f6944e

Browse files
committed
Further 1.0 cleanup
1 parent 8e935f3 commit 9f6944e

18 files changed

+41
-41
lines changed

src/Abstract/DynamicLink.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Export DynamicLinks API
22
export DynamicLinks,
3-
getindex, endof, length, iterate, lastindex, eltype,
3+
getindex, length, iterate, lastindex, eltype,
44
handle, header
55

66
# Export Dynamic Link API

src/Abstract/ObjectHandle.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Export ObjectHandle API
22
export ObjectHandle,
33
readmeta,
4-
seek, seekstart, skip, start, iostream, position, read, readuntil, eof,
4+
seek, seekstart, skip, iostream, position, read, readuntil, eof,
55
endianness, is64bit, isrelocatable, isexecutable, islibrary, isdynamic,
66
mangle_section_name, mangle_symbol_name, handle, header, format_string,
77
section_header_offset, section_header_size, section_header_type,
@@ -12,7 +12,7 @@ export ObjectHandle,
1212
export MagicMismatch
1313

1414
# Import methods for extension
15-
import Base: seek, seekstart, skip, start, position, read, readuntil, eof,
15+
import Base: seek, seekstart, skip, position, read, readuntil, eof,
1616
getindex
1717
import StructIO: unpack
1818

src/Abstract/Section.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Export Sections API
22
export Sections,
3-
getindex, endof, length, lastindex, iterate, eltype,
4-
find, findfirst,
3+
getindex, length, lastindex, iterate, eltype,
4+
findall, findfirst,
55
handle, header, format_string
66

77
# Export Section API
@@ -14,7 +14,7 @@ export SectionRef,
1414
read, seekstart, seek, eof, section_number
1515

1616
# Import Base methods for extension
17-
import Base: read, seek, seekstart, eof, length, eltype, find,
17+
import Base: read, seek, seekstart, eof, length, eltype, findall,
1818
findfirst, iterate, lastindex
1919

2020
"""
@@ -38,7 +38,7 @@ in emphasis:
3838
- eltype()
3939
4040
### Search
41-
- find()
41+
- findall()
4242
- findfirst()
4343
4444
### Misc.
@@ -66,20 +66,20 @@ function getindex(sections::Sections, idx)
6666
end
6767

6868
"""
69-
find(sections::Sections, name::String)
69+
findall(sections::Sections, name::String)
7070
7171
Return a list of sections that match the given `name`.
7272
"""
73-
function find(sections::Sections, name::AbstractString)
74-
return find(sections, [name])
73+
function findall(sections::Sections, name::AbstractString)
74+
return findall(sections, [name])
7575
end
7676

7777
"""
78-
find(sections::Sections, name::String)
78+
findall(sections::Sections, name::String)
7979
8080
Return a list of sections that match one of the given `names`.
8181
"""
82-
function find(sections::Sections, names::Vector{S}) where {S <: AbstractString}
82+
function findall(sections::Sections, names::Vector{S}) where {S <: AbstractString}
8383
return [s for s in sections if section_name(s) in names]
8484
end
8585

@@ -98,7 +98,7 @@ end
9898
Return the first section that matches on of the given `names`.
9999
"""
100100
function findfirst(sections::Sections, names::Vector{String})
101-
results = find(sections, names)
101+
results = findall(sections, names)
102102
if isempty(results)
103103
error("Could not find any sections that match $(names)")
104104
end

src/Abstract/Segment.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export Segment, deref, segment_name, segment_offset, segment_file_size,
88
export SegmentRef, segment_number
99

1010
# Import Base stuff for extension
11-
import Base: getindex, length, eltype, find, findfirst, iterate, lastindex
11+
import Base: getindex, length, eltype, findfirst, findall, iterate, lastindex
1212

1313
"""
1414
Segments
@@ -31,7 +31,7 @@ in emphasis:
3131
- eltype()
3232
3333
### Search
34-
- find()
34+
- findall()
3535
- findfirst()
3636
3737
### Misc.

src/Abstract/Symbol.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Export Symbols API
66
export Symbols,
7-
getindex, endof, length, iterate, lastindex, eltype,
7+
getindex, length, iterate, lastindex, eltype,
88
handle, header
99

1010
# Export SymtabEntry API

src/COFF/COFF.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ using StructIO
66
using ObjectFile
77
import ObjectFile: DynamicLink, DynamicLinks, RPath, ObjectHandle, Section, Sections, SectionRef,
88
Segment, Segments, SegmentRef, StrTab, Symbols, SymtabEntry, SymbolRef,
9-
getindex, endof, length, lastindex, iterate, eltype, handle, header, path,
9+
getindex, length, lastindex, iterate, eltype, handle, header, path,
1010
rpaths, canonical_rpaths, find_library, readmeta, seek, seekstart, skip,
1111
iostream, position, read, readuntil, eof, endianness, is64bit, isrelocatable,
1212
isexecutable, islibrary, isdynamic, mangle_section_name, mangle_symbol_name,
1313
format_string, section_header_offset, section_header_size, section_header_type,
14-
segment_header_offset, segment_header_size, segment_header_type, start,
14+
segment_header_offset, segment_header_size, segment_header_type, startaddr,
1515
symtab_entry_offset, symtab_entry_size, symtab_entry_type, find_libraries,
16-
find, findfirst, deref, contents, section_name, section_size,
16+
findfirst, deref, contents, section_name, section_size,
1717
section_offset, section_address, section_number, segment_name, segment_offset,
1818
segment_file_size, segment_memory_size, segment_address, strtab_lookup,
1919
symbol_name, symbol_value, isundef, isglobal, islocal, isweak, symbol_number

src/COFF/COFFHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ is64bit(oh::COFFHandle) = coff_header_is64bit(header(oh))
7878
isrelocatable(oh::COFFHandle) = isrelocatable(header(oh))
7979
isexecutable(oh::COFFHandle) = isexecutable(header(oh))
8080
islibrary(oh::COFFHandle) = islibrary(header(oh))
81-
isdynamic(oh::COFFHandle) = !isempty(find(Sections(oh), [".idata"]))
81+
isdynamic(oh::COFFHandle) = !isempty(findall(Sections(oh), [".idata"]))
8282
mangle_section_name(oh::COFFHandle, name::AbstractString) = string(".", name)
8383
function mangle_symbol_name(oh::COFFHandle, name::AbstractString)
8484
# sob

src/ELF/ELF.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ using StructIO
66
using ObjectFile
77
import ObjectFile: DynamicLink, DynamicLinks, RPath, ObjectHandle, Section, Sections, SectionRef,
88
Segment, Segments, SegmentRef, StrTab, Symbols, SymtabEntry, SymbolRef,
9-
getindex, endof, length, iterate, lastindex, eltype, handle, header, path,
9+
getindex, length, iterate, lastindex, eltype, handle, header, path,
1010
rpaths, canonical_rpaths, find_library, readmeta, seek, seekstart, skip,
1111
iostream, position, read, readuntil, eof, endianness, is64bit, isrelocatable,
1212
isexecutable, islibrary, isdynamic, mangle_section_name, mangle_symbol_name,
1313
format_string, section_header_offset, section_header_size, section_header_type,
14-
segment_header_offset, segment_header_size, segment_header_type, start,
14+
segment_header_offset, segment_header_size, segment_header_type, startaddr,
1515
symtab_entry_offset, symtab_entry_size, symtab_entry_type, find_libraries,
16-
find, findfirst, deref, contents, section_name, section_size,
16+
findfirst, deref, contents, section_name, section_size,
1717
section_offset, section_address, section_number, segment_name, segment_offset,
1818
segment_file_size, segment_memory_size, segment_address, strtab_lookup,
1919
symbol_name, symbol_value, isundef, isglobal, islocal, isweak, symbol_number

src/ELF/ELFHandle.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
export ELFHandle
33

44
# Import Base methods
5-
import Base: start, getindex
5+
import Base: getindex
66

77

88
"""
@@ -72,7 +72,7 @@ is64bit(oh::ELFHandle) = elf_internal_is64bit(oh.ei)
7272
isrelocatable(oh::ELFHandle) = header(oh).e_type == ET_REL
7373
isexecutable(oh::ELFHandle) = header(oh).e_type == ET_EXEC
7474
islibrary(oh::ELFHandle) = header(oh).e_type == ET_DYN
75-
isdynamic(oh::ELFHandle) = !isempty(find(Sections(oh), ".dynamic"))
75+
isdynamic(oh::ELFHandle) = !isempty(findall(Sections(oh), ".dynamic"))
7676
mangle_section_name(oh::ELFHandle, name::AbstractString) = string(".", name)
7777
mangle_symbol_name(oh::ELFHandle, name::AbstractString) = name
7878
format_string(::Type{H}) where {H <: ELFHandle} = "ELF"

src/ELF/ELFRelocation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ end
4242
deref(x::RelocationRef) = x.reloc
4343

4444
entrysize{T}(s::Relocations{T}) = sizeof(T)
45-
endof{T}(s::Relocations{T}) = div(s.sec.header.sh_size,entrysize(s))
45+
lastindex{T}(s::Relocations{T}) = div(s.sec.header.sh_size,entrysize(s))
4646
length(r::Relocations) = lastindex(r)
4747
function getindex{T}(s::Relocations{T},n)
4848
if n < 1 || n > length(s)

0 commit comments

Comments
 (0)