Skip to content

Commit 3c312ba

Browse files
Declare wasm32 arch as 32-bit environment
1 parent b5b16b0 commit 3c312ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/FoundationEssentials/Data/Data.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
588588
@usableFromInline typealias Buffer = (UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8,
589589
UInt8, UInt8, UInt8, UInt8, UInt8, UInt8) //len //enum
590590
@usableFromInline var bytes: Buffer
591-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
591+
#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32)
592592
@usableFromInline typealias Buffer = (UInt8, UInt8, UInt8, UInt8,
593593
UInt8, UInt8) //len //enum
594594
@usableFromInline var bytes: Buffer
@@ -621,7 +621,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
621621
assert(count <= MemoryLayout<Buffer>.size)
622622
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
623623
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))
624-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
624+
#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32)
625625
bytes = (UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0), UInt8(0))
626626
#else
627627
#error ("Unsupported architecture: initialization for Buffer is required for this architecture")
@@ -808,7 +808,7 @@ public struct Data : Equatable, Hashable, RandomAccessCollection, MutableCollect
808808

809809
#if arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
810810
@usableFromInline internal typealias HalfInt = Int32
811-
#elseif arch(i386) || arch(arm) || arch(arm64_32)
811+
#elseif arch(i386) || arch(arm) || arch(arm64_32) || arch(wasm32)
812812
@usableFromInline internal typealias HalfInt = Int16
813813
#else
814814
#error ("Unsupported architecture: a definition of half of the pointer sized Int needs to be defined for this architecture")

0 commit comments

Comments
 (0)