Skip to content

Commit 460a521

Browse files
committed
Revert "[stdlib] AutoreleasingUnsafeMutablePointer: Switch subscripts to _read accessors"
This was an ABI break, since it didn't make it into 5.0. Using _read here is unimportant, so we're just going to revert rather than try being fancy. This reverts commit 04586e3.
1 parent 62cb20e commit 460a521

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

stdlib/public/core/BridgeObjectiveC.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,10 @@ public struct AutoreleasingUnsafeMutablePointer<Pointee /* TODO : class */>
374374
/// `Pointee`.
375375
@inlinable
376376
public var pointee: Pointee {
377-
@_transparent _read {
377+
/// Retrieve the value the pointer points to.
378+
@_transparent get {
378379
// We can do a strong load normally.
379-
yield UnsafePointer(self).pointee
380+
return UnsafePointer(self).pointee
380381
}
381382
/// Set the value the pointer points to, copying over the previous value.
382383
///
@@ -413,9 +414,9 @@ public struct AutoreleasingUnsafeMutablePointer<Pointee /* TODO : class */>
413414
@inlinable // unsafe-performance
414415
public subscript(i: Int) -> Pointee {
415416
@_transparent
416-
_read {
417+
get {
417418
// We can do a strong load normally.
418-
yield ((UnsafePointer<Pointee>(self) + i).pointee)
419+
return (UnsafePointer<Pointee>(self) + i).pointee
419420
}
420421
}
421422

0 commit comments

Comments
 (0)