Skip to content

Commit 574d608

Browse files
authored
Expose Decimal.pow() as a public API on FoundationEssentials (#1471)
1 parent 1734c7b commit 574d608

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

Sources/FoundationEssentials/Decimal/Decimal+Compatibility.swift

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,23 +80,13 @@ extension Decimal : _ObjectiveCBridgeable {
8080
// MARK: - Bridging code to C functions
8181
// We have one implementation function for each, and an entry point for both Darwin (cdecl, exported from the framework), and swift-corelibs-foundation (SPI here and available via that package as API)
8282

83-
#if FOUNDATION_FRAMEWORK
8483
@available(macOS 10.10, iOS 8.0, watchOS 2.0, tvOS 9.0, *)
8584
public func pow(_ x: Decimal, _ y: Int) -> Decimal {
8685
let result = try? x._power(
8786
exponent: y, roundingMode: .plain
8887
)
8988
return result ?? .nan
9089
}
91-
#else
92-
@_spi(SwiftCorelibsFoundation)
93-
public func _pow(_ x: Decimal, _ y: Int) -> Decimal {
94-
let result = try? x._power(
95-
exponent: y, roundingMode: .plain
96-
)
97-
return result ?? .nan
98-
}
99-
#endif
10090

10191
private func __NSDecimalAdd(
10292
_ result: UnsafeMutablePointer<Decimal>,

0 commit comments

Comments
 (0)