Skip to content

Commit f4cc793

Browse files
committed
Quash lots of depwarns
1 parent 058bdba commit f4cc793

26 files changed

+100
-71
lines changed

REQUIRE

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
julia 0.6
1+
julia 0.7.0-rc3
22
StructIO 0.2
3-
Reexport
4-
Compat
3+
Reexport

src/Abstract/DynamicLink.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Return the list of paths that will be searched for shared libraries.
107107
"""
108108
@mustimplement rpaths(rpath::RPath)
109109

110-
endof(rpath::RPath) = endof(rpaths(rpath))
110+
endof(rpath::RPath) = lastindex(rpaths(rpath))
111111
start(rpath::RPath) = 1
112112
done(rpath::RPath, idx) = idx > length(rpath)
113113
next(rpath::RPath, idx) = (rpath[idx], idx+1)

src/Abstract/Printing.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ function show_collection(io::IO, stuff::ST, ::Type{H}) where {ST} where {H <: Ob
2525
if limited && length(stuff) > 20
2626
for idx in 1:10
2727
print(io, "\n [$(idx)] ")
28-
showcompact(io, stuff[idx])
28+
show(IOContext(io, :compact => true), stuff[idx])
2929
end
3030
print(io, "\n \u2026")
3131
for idx in length(stuff)-10:length(stuff)
3232
print(io, "\n [$(idx)] ")
33-
showcompact(io, stuff[idx])
33+
show(IOContext(io, :compact => true), stuff[idx])
3434
end
3535
else
3636
for idx in 1:length(stuff)
3737
print(io, "\n [$(idx)] ")
38-
showcompact(io, stuff[idx])
38+
show(IOContext(io, :compact => true), stuff[idx])
3939
end
4040
end
41-
end
41+
end

src/Abstract/Section.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,9 @@ function show(io::IO, s::Union{Section{H},SectionRef{H}}) where {H <: ObjectHand
340340
if !get(io, :compact, false)
341341
println(io)
342342
println(io, " Name: $(section_name(s))")
343-
println(io, " Size: 0x$(hex(section_size(s)))")
344-
println(io, " Offset: 0x$(hex(section_offset(s)))")
345-
print(io, " Address: 0x$(hex(section_address(s)))")
343+
println(io, " Size: 0x$(string(section_size(s), base=16))")
344+
println(io, " Offset: 0x$(string(section_offset(s), base=16))")
345+
print(io, " Address: 0x$(string(section_address(s), base=16))")
346346
else
347347
print(io, " \"$(section_name(s))\"")
348348
end

src/COFF/COFF.jl

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ using StructIO
44

55
# Bring in ObjectFile definitions
66
using ObjectFile
7-
importall ObjectFile
8-
7+
import ObjectFile: DynamicLink, DynamicLinks, RPath, ObjectHandle, Section, Sections, SectionRef,
8+
Segment, Segments, SegmentRef, StrTab, Symbols, SymtabEntry, SymbolRef,
9+
getindex, endof, length, start, next, done, eltype, handle, header, path,
10+
rpaths, canonical_rpaths, find_library, readmeta, seek, seekstart, skip,
11+
iostream, position, read, readuntil, eof, endianness, is64bit, isrelocatable,
12+
isexecutable, islibrary, isdynamic, mangle_section_name, mangle_symbol_name,
13+
format_string, section_header_offset, section_header_size, section_header_type,
14+
segment_header_offset, segment_header_size, segment_header_type,
15+
symtab_entry_offset, symtab_entry_size, symtab_entry_type, find_libraries,
16+
find, findfirst, deref, contents, section_name, section_size,
17+
section_offset, section_address, section_number, segment_name, segment_offset,
18+
segment_file_size, segment_memory_size, segment_address, strtab_lookup,
19+
symbol_name, symbol_value, isundef, isglobal, islocal, isweak, symbol_number
920
# Load in imported C #define constants
1021
include("constants.jl")
1122

@@ -18,4 +29,4 @@ include("COFFStrTab.jl")
1829
include("COFFSymbol.jl")
1930
include("COFFDynamicLink.jl")
2031

21-
end # module COFF
32+
end # module COFF

src/COFF/COFFDynamicLink.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ end
4949
DynamicLinks(oh::COFFHandle) = COFFDynamicLinks(oh)
5050

5151
handle(dls::COFFDynamicLinks) = dls.handle
52-
endof(dls::COFFDynamicLinks) = endof(dls.links)
52+
endof(dls::COFFDynamicLinks) = lastindex(dls.links)
5353
getindex(dls::COFFDynamicLinks, idx) = getindex(dls.links, idx)
5454

5555

src/COFF/COFFHandle.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ function readmeta(io::IO, ::Type{H}) where {H <: COFFHandle}
4949
magic = [read(io, UInt8) for idx in 1:4]
5050
if any(magic .!= PE_magic)
5151
msg = """
52-
Magic Number 0x$(join(hex.(magic),"")) does not match expected PE
53-
magic number 0x$(join("", hex.(PE_magic)))
52+
Magic Number 0x$(join(string.(magic, base=16),"")) does not match expected PE
53+
magic number 0x$(join("", string.(PE_magic, base=16)))
5454
"""
5555
throw(MagicMismatch(replace(strip(msg), "\n" => " ")))
5656
end

src/COFF/COFFOptionalHeader.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ function read(io::IO, ::Type{COFFOptionalHeader})
116116
dirs = unpack(io, COFFDataDirectories)
117117
return COFFOptionalHeader64(standard, windows, dirs)
118118
else
119-
error("Unknown COFF optional header magic 0x$(hex(standard.Magic))")
119+
error("Unknown COFF optional header magic 0x$(string(standard.Magic, base=16))")
120120
end
121121
end
122122

src/COFF/COFFSymbol.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ function symbol_type_string(sym::COFFSymtabEntry)
159159

160160
# If we didn't get ANY info, complain
161161
if isempty(type_string)
162-
string("Unknown Symbol Type (0x", hex(sym.Type), ")")
162+
string("Unknown Symbol Type (0x", string(sym.Type, base=16), ")")
163163
end
164164

165165
return type_string
166166
end
167-
@derefmethod symbol_type_string(s::COFFSymbolRef)
167+
@derefmethod symbol_type_string(s::COFFSymbolRef)

src/ELF/ELF.jl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,19 @@ using StructIO
44

55
# Bring in ObjectFile definitions
66
using ObjectFile
7-
importall ObjectFile
8-
using Compat
9-
7+
import ObjectFile: DynamicLink, DynamicLinks, RPath, ObjectHandle, Section, Sections, SectionRef,
8+
Segment, Segments, SegmentRef, StrTab, Symbols, SymtabEntry, SymbolRef,
9+
getindex, endof, length, start, next, done, eltype, handle, header, path,
10+
rpaths, canonical_rpaths, find_library, readmeta, seek, seekstart, skip,
11+
iostream, position, read, readuntil, eof, endianness, is64bit, isrelocatable,
12+
isexecutable, islibrary, isdynamic, mangle_section_name, mangle_symbol_name,
13+
format_string, section_header_offset, section_header_size, section_header_type,
14+
segment_header_offset, segment_header_size, segment_header_type,
15+
symtab_entry_offset, symtab_entry_size, symtab_entry_type, find_libraries,
16+
find, findfirst, deref, contents, section_name, section_size,
17+
section_offset, section_address, section_number, segment_name, segment_offset,
18+
segment_file_size, segment_memory_size, segment_address, strtab_lookup,
19+
symbol_name, symbol_value, isundef, isglobal, islocal, isweak, symbol_number
1020
# Load in imported C #define constants
1121
include("constants.jl")
1222

0 commit comments

Comments
 (0)