Skip to content

Commit 4d944bb

Browse files
committed
[embedded] Guard @_transparent in UnsafePointer APIs with #if
1 parent c5fa323 commit 4d944bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/public/core/UnsafePointer.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,9 @@ extension UnsafePointer {
442442
/// - Returns: A pointer to the stored property represented
443443
/// by the key path, or `nil`.
444444
@_alwaysEmitIntoClient
445+
#if $Embedded
445446
@_transparent
447+
#endif
446448
public func pointer<Property>(
447449
to property: KeyPath<Pointee, Property>
448450
) -> UnsafePointer<Property>? {
@@ -1326,7 +1328,9 @@ extension UnsafeMutablePointer {
13261328
/// - Returns: A pointer to the stored property represented
13271329
/// by the key path, or `nil`.
13281330
@_alwaysEmitIntoClient
1331+
#if $Embedded
13291332
@_transparent
1333+
#endif
13301334
public func pointer<Property>(
13311335
to property: KeyPath<Pointee, Property>
13321336
) -> UnsafePointer<Property>? {
@@ -1348,7 +1352,9 @@ extension UnsafeMutablePointer {
13481352
/// - Returns: A mutable pointer to the stored property represented
13491353
/// by the key path, or `nil`.
13501354
@_alwaysEmitIntoClient
1355+
#if $Embedded
13511356
@_transparent
1357+
#endif
13521358
public func pointer<Property>(
13531359
to property: WritableKeyPath<Pointee, Property>
13541360
) -> UnsafeMutablePointer<Property>? {

0 commit comments

Comments
 (0)