|
|
@@ -63,8 +63,8 @@ func arrayOfBytes<T>(value:T, length:Int? = nil) -> Array<UInt8> {
|
|
|
|
|
|
let valuePointer = UnsafeMutablePointer<T>.allocate(capacity: 1)
|
|
|
valuePointer.pointee = value
|
|
|
-
|
|
|
- let bytesPointer = UnsafeMutablePointer<UInt8>(valuePointer)
|
|
|
+
|
|
|
+ let bytesPointer = UnsafeMutablePointer<UInt8>(OpaquePointer(valuePointer))
|
|
|
var bytes = Array<UInt8>(repeating: 0, count: totalBytes)
|
|
|
for j in 0..<min(sizeof(T.self),totalBytes) {
|
|
|
bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee
|