Skip to content

Commit 1f79f57

Browse files
committed
0.7 compat
1 parent 76b59ec commit 1f79f57

18 files changed

+24
-27
lines changed

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
julia 0.6
22
StructIO 0.2
33
Reexport
4+
Compat

src/Abstract/DynamicLink.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ given below, with methods that subclasses must implement marked in emphasis:
3434
### Misc.
3535
- *handle()*
3636
"""
37-
3837
abstract type DynamicLinks{H <: ObjectHandle} end
3938

4039
@mustimplement endof(dls::DynamicLinks)
@@ -130,9 +129,9 @@ function canonical_rpaths(rpath::RPath)
130129
# `@loader_path`. Do the same for `@executable_path` even though
131130
# that's technically incorrect, because we don't have a good way to
132131
# track the web of dependencies right now.
133-
paths[idx] = replace(paths[idx], "\$ORIGIN", origin)
134-
paths[idx] = replace(paths[idx], "@loader_path", origin)
135-
paths[idx] = replace(paths[idx], "@executable_path", origin)
132+
paths[idx] = replace(paths[idx], "\$ORIGIN" => origin)
133+
paths[idx] = replace(paths[idx], "@loader_path" => origin)
134+
paths[idx] = replace(paths[idx], "@executable_path" => origin)
136135
paths[idx] = abspath(paths[idx])
137136
end
138137
return paths

src/Abstract/ObjectHandle.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const ObjTypes = Type[]
105105
Read an Object File out from an `IOStream`. This is the first method you
106106
should call in order to manipulate object files.
107107
"""
108-
function readmeta{T<:ObjectHandle}(io::IO, ::Type{T})
108+
function readmeta(io::IO, ::Type{T}) where {T<:ObjectHandle}
109109
# Implementing packages such as MachO.jl must explicitly override this
110110
error("$T must implement readmeta")
111111
end
@@ -135,7 +135,7 @@ function readmeta(io::IO)
135135
Object file is not any of $(join(ObjTypes, ", "))!
136136
To force one object file format use readmeta(io, T).
137137
""")
138-
error(replace(msg, "\n", " "))
138+
error(replace(msg, "\n" => " "))
139139
end
140140

141141
"""

src/Abstract/Symbol.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ passthroughs to the underlying `SymtabEntry` API calls for ease of use.
177177
- symbol_value()
178178
- isundef()
179179
"""
180-
181180
abstract type SymbolRef{H<:ObjectHandle} end
182181

183182
"""

src/COFF/COFFHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function readmeta(io::IO, ::Type{H}) where {H <: COFFHandle}
5252
Magic Number 0x$(join(hex.(magic),"")) does not match expected PE
5353
magic number 0x$(join("", hex.(PE_magic)))
5454
"""
55-
throw(MagicMismatch(replace(strip(msg), "\n", " ")))
55+
throw(MagicMismatch(replace(strip(msg), "\n" => " ")))
5656
end
5757

5858
# Read the PE header and place the header offset just past the PE_magic

src/COFF/COFFSymbol.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
export COFFSymbols, COFFSymtabEntry, COFFSymbolRef
22

3-
# We need to import stuff from Base in order to do our tricksy Symbols stuffage
4-
import Base: iteratorsize, SizeUnknown
5-
63
"""
74
COFFSymbols
85

src/ELF/ELF.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ using StructIO
55
# Bring in ObjectFile definitions
66
using ObjectFile
77
importall ObjectFile
8+
using Compat
89

910
# Load in imported C #define constants
1011
include("constants.jl")

src/ELF/ELFDebug.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ end
6666
struct dl_phdr_info
6767
dlpi_addr::UInt64
6868
dlpi_name::Ptr{UInt8}
69-
dlpi_phdr::Ptr{Void}
69+
dlpi_phdr::Ptr{Cvoid}
7070
dlpi_phnum::UInt16
7171
end
7272

73-
function callback(info::Ptr{dl_phdr_info},size::Csize_t, data::Ptr{Void})
73+
function callback(info::Ptr{dl_phdr_info},size::Csize_t, data::Ptr{Cvoid})
7474
push!(unsafe_pointer_to_objref(data),unsafe_load(info))
7575
convert(Cint,0)
7676
end
7777

7878
function loaded_libraries()
7979
x = Array(dl_phdr_info,0)
80-
ccall(:dl_iterate_phdr, Cint, (Ptr{Void}, Any), cfunction(callback, Cint, (Ptr{dl_phdr_info},Csize_t,Ptr{Void})), x)
80+
ccall(:dl_iterate_phdr, Cint, (Ptr{Cvoid}, Any), cfunction(callback, Cint, (Ptr{dl_phdr_info},Csize_t,Ptr{Cvoid})), x)
8181
x
8282
end
8383

src/ELF/ELFDynEntry.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ strtab_lookup(d::ELFDynEntryRef) = strtab_lookup(StrTab(d), deref(d).d_val)
8787

8888

8989
function show(io::IO, d::DT) where {DT <: ELFDynEntry}
90-
print(io, "ELFDynEntry", DT <: ELFDynEntry64 ? " (64 bit)": "")
90+
print(io, "ELFDynEntry", DT <: ELFDynEntry64 ? " (64 bit)" : "")
9191
print(io, " $(dyn_entry_type_string(d))")
9292
end
9393

src/ELF/ELFHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function readmeta(io::IO, ::Type{H}) where {H <: ELFHandle}
4141
Magic Number 0x$(join(hex.(magic),"")) does not match expected ELF
4242
magic number 0x$(join("", hex.(elven_magic)))
4343
"""
44-
throw(MagicMismatch(replace(strip(msg), "\n", " ")))
44+
throw(MagicMismatch(replace(strip(msg), "\n" => " ")))
4545
end
4646

4747
# Read the ELF Internal data, then skip its padding

0 commit comments

Comments
 (0)