@@ -683,15 +683,15 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
683
683
@usableFromInline
684
684
typealias Buffer = ( UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 ,
685
685
UInt8 , UInt8 , UInt8 , UInt8 , UInt8 , UInt8 ) //len //enum
686
- @usableFromInline
687
- var bytes : Buffer
688
- #elseif arch(i386) || arch(arm)
686
+ #elseif arch(i386) || arch(arm) || arch(arm64_32)
689
687
@usableFromInline
690
688
typealias Buffer = ( UInt8 , UInt8 , UInt8 , UInt8 ,
691
689
UInt8 , UInt8 ) //len //enum
690
+ #else
691
+ #error ("Unsupported architecture: a definition of Buffer needs to be made with N = (MemoryLayout<(Int, Int)>.size - 2) UInt8 members to a tuple")
692
+ #endif
692
693
@usableFromInline
693
694
var bytes : Buffer
694
- #endif
695
695
@usableFromInline
696
696
var length : UInt8
697
697
@@ -720,9 +720,11 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
720
720
assert ( count <= MemoryLayout< Buffer> . size)
721
721
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
722
722
bytes = ( UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) )
723
- #elseif arch(i386) || arch(arm)
723
+ #elseif arch(i386) || arch(arm) || arch(arm64_32)
724
724
bytes = ( UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) , UInt8 ( 0 ) ,
725
725
UInt8 ( 0 ) , UInt8 ( 0 ) )
726
+ #else
727
+ #error ("Unsupported architecture: initialization for Buffer is required for this architecture")
726
728
#endif
727
729
length = UInt8 ( count)
728
730
}
@@ -878,9 +880,11 @@ public struct Data : ReferenceConvertible, Equatable, Hashable, RandomAccessColl
878
880
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
879
881
@usableFromInline
880
882
internal typealias HalfInt = Int32
881
- #elseif arch(i386) || arch(arm)
883
+ #elseif arch(i386) || arch(arm) || arch(arm64_32)
882
884
@usableFromInline
883
885
internal typealias HalfInt = Int16
886
+ #else
887
+ #error ("Unsupported architecture: a definition of half of the pointer sized Int needs to be defined for this architecture")
884
888
#endif
885
889
886
890
@usableFromInline
0 commit comments