Skip to content

Commit 1de7e4a

Browse files
committed
immutable -> struct
1 parent 95a97cd commit 1de7e4a

35 files changed

+88
-88
lines changed

src/Abstract/Debug.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# # # Higher level debug info support
2-
immutable DebugSections{T<:ObjectHandle, S}
2+
struct DebugSections{T<:ObjectHandle, S}
33
oh::T
44
debug_abbrev::Nullable{S}
55
debug_aranges::Nullable{S}

src/Abstract/ObjectHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ This is an error type used to denote that `readmeta()` was called on a file
8686
that does not contain the proper magic at the beginning for the type of object
8787
file that was attempting to be loaded.
8888
"""
89-
immutable MagicMismatch
89+
struct MagicMismatch
9090
message
9191
end
9292

src/Abstract/Relocation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ abstract type Relocation{T<:ObjectHandle} end
22
abstract type RelocationRef{T<:ObjectHandle} end
33

44

5-
immutable LOIByName
5+
struct LOIByName
66
addrs::Dict{Symbol, UInt64}
77
end
88
function getSectionLoadAddress(LOI::LOIByName, x::Union{Symbol, AbstractString})

src/COFF/COFFDynamicLink.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
export COFFDynamicLinks, COFFDynamicLink, COFFRPath
22

3-
immutable COFFDynamicLink{H <: COFFHandle} <: DynamicLink{H}
3+
struct COFFDynamicLink{H <: COFFHandle} <: DynamicLink{H}
44
path::String
55
end
66
path(dl::COFFDynamicLink) = dl.path
77

88

9-
@io immutable COFFImageImportDescriptor
9+
@io struct COFFImageImportDescriptor
1010
Characteristics::UInt32
1111
TimeDateStamp::UInt32
1212
ForwarderChain::UInt32
1313
Name::UInt32
1414
FirstThunk::UInt32
1515
end
1616

17-
immutable COFFDynamicLinks{H <: COFFHandle} <: DynamicLinks{H}
17+
struct COFFDynamicLinks{H <: COFFHandle} <: DynamicLinks{H}
1818
handle::H
1919
links::Vector
2020
end
@@ -61,7 +61,7 @@ they _do_ seach the same directory as the loading binary (e.g. the `\$ORIGIN`).
6161
We use `COFFRPath` to effect this, although strictly speaking there is no such
6262
thing as a "COFF RPath".
6363
"""
64-
immutable COFFRPath{H <: COFFHandle} <: RPath{H}
64+
struct COFFRPath{H <: COFFHandle} <: RPath{H}
6565
handle::H
6666
end
6767

src/COFF/COFFHandle.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Base: show
88
An `ObjectHandle` subclass for COFF files, this is the primary object by which
99
client applications will interact with COFF files.
1010
"""
11-
immutable COFFHandle{T<:IO} <: ObjectHandle
11+
struct COFFHandle{T<:IO} <: ObjectHandle
1212
# Backing IOS and start point within the IOStream of this COFF object
1313
io::T
1414
start::Int

src/COFF/COFFHeader.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export COFFHeader
22

3-
@io immutable COFFHeader
3+
@io struct COFFHeader
44
Machine::UInt16
55
NumberOfSections::UInt16
66
TimeDateStamp::UInt32

src/COFF/COFFOptionalHeader.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export COFFOptionalHeaderStandard, COFFImageDataDirectory, COFFDataDirectories,
22
COFFOptionalHeaderWindows32, COFFOptionalHeaderWindows64,
33
COFFOptionalHeader32, COFFOptionalHeader64
44

5-
@io immutable COFFOptionalHeaderStandard
5+
@io struct COFFOptionalHeaderStandard
66
Magic::UInt16
77
MajorLinkerVersion::UInt8
88
MinorLinkerVersion::UInt8
@@ -15,12 +15,12 @@ end
1515
const OPTHEADER_STANDARD_MAGIC32 = 0x10b
1616
const OPTHEADER_STANDARD_MAGIC64 = 0x20b
1717

18-
@io immutable COFFImageDataDirectory
18+
@io struct COFFImageDataDirectory
1919
VirtualAddress::UInt32
2020
Size::UInt32
2121
end
2222

23-
@io immutable COFFDataDirectories
23+
@io struct COFFDataDirectories
2424
ExportTable::COFFImageDataDirectory
2525
ImportTable::COFFImageDataDirectory
2626
ResourceTable::COFFImageDataDirectory
@@ -39,7 +39,7 @@ end
3939
Reserverd::COFFImageDataDirectory
4040
end
4141

42-
@io immutable COFFOptionalHeaderWindows32
42+
@io struct COFFOptionalHeaderWindows32
4343
ImageBase::UInt32
4444
SectionAlignment::UInt32
4545
FileAlignment::UInt32
@@ -63,7 +63,7 @@ end
6363
NumberOfRvaAndSizes::UInt32
6464
end
6565

66-
@io immutable COFFOptionalHeaderWindows64
66+
@io struct COFFOptionalHeaderWindows64
6767
ImageBase::UInt64
6868
SectionAlignment::UInt32
6969
FileAlignment::UInt32
@@ -88,14 +88,14 @@ end
8888
end
8989

9090
abstract type COFFOptionalHeader end
91-
@io immutable COFFOptionalHeader32 <: COFFOptionalHeader
91+
@io struct COFFOptionalHeader32 <: COFFOptionalHeader
9292
standard::COFFOptionalHeaderStandard
9393
BaseOfData::UInt32
9494
windows::COFFOptionalHeaderWindows32
9595
directories::COFFDataDirectories
9696
end
9797

98-
@io immutable COFFOptionalHeader64 <: COFFOptionalHeader
98+
@io struct COFFOptionalHeader64 <: COFFOptionalHeader
9999
standard::COFFOptionalHeaderStandard
100100
windows::COFFOptionalHeaderWindows64
101101
directories::COFFDataDirectories

src/COFF/COFFSection.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
COFF Section header table type, containing information about the number of
55
sections within the COFF object, the location of the section headers, etc...
66
"""
7-
immutable COFFSections{H <: COFFHandle} <: Sections{COFFHandle}
7+
struct COFFSections{H <: COFFHandle} <: Sections{COFFHandle}
88
handle::H
99
end
1010

@@ -21,7 +21,7 @@ endof(sections::COFFSections) = num_sections(header(handle(sections)))
2121
COFF Section header type, containing information about a `Section` of the COFF
2222
file such as its name, its size, location within memory, etc...
2323
"""
24-
@io immutable COFFSection{H <: COFFHandle} <: Section{H}
24+
@io struct COFFSection{H <: COFFHandle} <: Section{H}
2525
Name::fixed_string{UInt64}
2626
VirtualSize::UInt32
2727
VirtualAddress::UInt32
@@ -53,7 +53,7 @@ section_offset(s::COFFSection) = s.PointerToRawData
5353
5454
COFF `SectionRef` type, containing a `COFFSection` and important metadata..
5555
"""
56-
immutable COFFSectionRef{H <: COFFHandle} <: SectionRef{H}
56+
struct COFFSectionRef{H <: COFFHandle} <: SectionRef{H}
5757
sections::COFFSections{H}
5858
section::COFFSection{H}
5959
idx::UInt32

src/COFF/COFFStrTab.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export COFFStrTab
66
COFF `StrTab` type, containing the metadata necessary to perform string table
77
lookups, via the `strtab_lookup()` method.
88
"""
9-
immutable COFFStrTab{H <: COFFHandle} <: StrTab{H}
9+
struct COFFStrTab{H <: COFFHandle} <: StrTab{H}
1010
handle::COFFHandle
1111
offset::UInt32
1212
end

src/COFF/COFFSymbol.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ COFF symbol table, contains the list of symbols defined within the object file.
1111
Note that because COFF Symbols are variable-length, we store a table of offsets
1212
at which the (non-auxilliary) symbols can be found.
1313
"""
14-
immutable COFFSymbols{H<:COFFHandle} <: Symbols{H}
14+
struct COFFSymbols{H<:COFFHandle} <: Symbols{H}
1515
handle::H
1616
symbol_offsets::Vector{UInt64}
1717
end
@@ -64,7 +64,7 @@ endof(syms::COFFSymbols) = num_symbols(header(handle(syms)))
6464
# because it tries to pre-allocate an array of the proper size.
6565
# iteratorsize(::Type{H}) where {H <: COFFSymbols} = SizeUnknown()
6666

67-
@io immutable COFFSymtabEntry{H <: COFFHandle} <: SymtabEntry{H}
67+
@io struct COFFSymtabEntry{H <: COFFHandle} <: SymtabEntry{H}
6868
Name::fixed_string{UInt64}
6969
Value::UInt32
7070
SectionNumber::Int16
@@ -103,7 +103,7 @@ isweak(sym::COFFSymtabEntry) = sym.StorageClass == IMAGE_SYM_CLASS_WEAK_EXTERNAL
103103
104104
Contains a reference to an `COFFSymtabEntry`, as well as an `COFFSymbols`, etc...
105105
"""
106-
immutable COFFSymbolRef{H<:COFFHandle} <: SymbolRef{H}
106+
struct COFFSymbolRef{H<:COFFHandle} <: SymbolRef{H}
107107
syms::COFFSymbols{H}
108108
entry::COFFSymtabEntry{H}
109109
idx::UInt32

0 commit comments

Comments
 (0)