Documentation Archive Developer
Search

MachO Changes for Swift

MachO

Added nlist.init(n_un: nlist.__Unnamed_union_n_un, n_type: UInt8, n_sect: UInt8, n_desc: Int16, n_value: UInt32)
Added nlist.n_un
Added nlist_64.init(n_un: nlist_64.__Unnamed_union_n_un, n_type: UInt8, n_sect: UInt8, n_desc: UInt16, n_value: UInt64)
Added nlist_64.n_un
Added ranlib.init(ran_un: ranlib.__Unnamed_union_ran_un, ran_off: UInt32)
Added ranlib.ran_un
Modified nlist [struct]
Declaration
From
struct nlist {
    var n_type: UInt8
    var n_sect: UInt8
    var n_desc: Int16
    var n_value: UInt32
    init()
}
To
struct nlist {
    struct __Unnamed_union_n_un {
        var n_name: UnsafeMutablePointer<Int8>
        var n_strx: UInt32
        init(n_name n_name: UnsafeMutablePointer<Int8>)
        init(n_strx n_strx: UInt32)
        init()
    }
    var n_un: nlist.__Unnamed_union_n_un
    var n_type: UInt8
    var n_sect: UInt8
    var n_desc: Int16
    var n_value: UInt32
    init()
    init(n_un n_un: nlist.__Unnamed_union_n_un, n_type n_type: UInt8, n_sect n_sect: UInt8, n_desc n_desc: Int16, n_value n_value: UInt32)
}

Modified nlist_64 [struct]
Declaration
From
struct nlist_64 {
    var n_type: UInt8
    var n_sect: UInt8
    var n_desc: UInt16
    var n_value: UInt64
    init()
}
To
struct nlist_64 {
    struct __Unnamed_union_n_un {
        var n_strx: UInt32
        init(n_strx n_strx: UInt32)
        init()
    }
    var n_un: nlist_64.__Unnamed_union_n_un
    var n_type: UInt8
    var n_sect: UInt8
    var n_desc: UInt16
    var n_value: UInt64
    init()
    init(n_un n_un: nlist_64.__Unnamed_union_n_un, n_type n_type: UInt8, n_sect n_sect: UInt8, n_desc n_desc: UInt16, n_value n_value: UInt64)
}

Modified ranlib [struct]
Declaration
From
struct ranlib {
    var ran_off: UInt32
    init()
}
To
struct ranlib {
    struct __Unnamed_union_ran_un {
        var ran_strx: UInt32
        var ran_name: UnsafeMutablePointer<Int8>
        init(ran_strx ran_strx: UInt32)
        init(ran_name ran_name: UnsafeMutablePointer<Int8>)
        init()
    }
    var ran_un: ranlib.__Unnamed_union_ran_un
    var ran_off: UInt32
    init()
    init(ran_un ran_un: ranlib.__Unnamed_union_ran_un, ran_off ran_off: UInt32)
}