瀏覽代碼

exported:true has no effect

Marcin Krzyzanowski 5 年之前
父節點
當前提交
04414a31ca

+ 6 - 6
Sources/CryptoSwift/Generics.swift

@@ -19,12 +19,12 @@
 /// - parameter length: length of output array. By default size of value type
 ///
 /// - returns: Array of bytes
-@_specialize(exported: true, where T == Int)
-@_specialize(exported: true, where T == UInt)
-@_specialize(exported: true, where T == UInt8)
-@_specialize(exported: true, where T == UInt16)
-@_specialize(exported: true, where T == UInt32)
-@_specialize(exported: true, where T == UInt64)
+@_specialize(where T == Int)
+@_specialize(where T == UInt)
+@_specialize(where T == UInt8)
+@_specialize(where T == UInt16)
+@_specialize(where T == UInt32)
+@_specialize(where T == UInt64)
 func arrayOfBytes<T: FixedWidthInteger>(value: T, length totalBytes: Int = MemoryLayout<T>.size) -> Array<UInt8> {
   let valuePointer = UnsafeMutablePointer<T>.allocate(capacity: 1)
   valuePointer.pointee = value

+ 2 - 2
Sources/CryptoSwift/UInt16+Extension.swift

@@ -15,12 +15,12 @@
 
 /** array of bytes */
 extension UInt16 {
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T) where T.Element == UInt8, T.Index == Int {
     self = UInt16(bytes: bytes, fromIndex: bytes.startIndex)
   }
 
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int {
     if bytes.isEmpty {
       self = 0

+ 2 - 2
Sources/CryptoSwift/UInt32+Extension.swift

@@ -24,12 +24,12 @@ extension UInt32: _UInt32Type {}
 
 /** array of bytes */
 extension UInt32 {
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T) where T.Element == UInt8, T.Index == Int {
     self = UInt32(bytes: bytes, fromIndex: bytes.startIndex)
   }
 
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int {
     if bytes.isEmpty {
       self = 0

+ 2 - 2
Sources/CryptoSwift/UInt64+Extension.swift

@@ -15,12 +15,12 @@
 
 /** array of bytes */
 extension UInt64 {
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T) where T.Element == UInt8, T.Index == Int {
     self = UInt64(bytes: bytes, fromIndex: bytes.startIndex)
   }
 
-  @_specialize(exported: true, where T == ArraySlice<UInt8>)
+  @_specialize(where T == ArraySlice<UInt8>)
   init<T: Collection>(bytes: T, fromIndex index: T.Index) where T.Element == UInt8, T.Index == Int {
     if bytes.isEmpty {
       self = 0