@@ -265,7 +265,9 @@ public struct ManagedBufferPointer<Header, Element> : Equatable {
265
265
/// an instance is created.
266
266
@inlinable // FIXME(sil-serialize-all)
267
267
public var capacity : Int {
268
- return ( _capacityInBytes &- _My. _elementOffset) / MemoryLayout< Element> . stride
268
+ return (
269
+ _capacityInBytes &- ManagedBufferPointer . _elementOffset
270
+ ) / MemoryLayout< Element> . stride
269
271
}
270
272
271
273
/// Call `body` with an `UnsafeMutablePointer` to the stored
@@ -352,13 +354,13 @@ public struct ManagedBufferPointer<Header, Element> : Equatable {
352
354
minimumCapacity >= 0 ,
353
355
" ManagedBufferPointer must have non-negative capacity " )
354
356
355
- let totalSize = _My . _elementOffset
357
+ let totalSize = ManagedBufferPointer . _elementOffset
356
358
+ minimumCapacity * MemoryLayout< Element> . stride
357
359
358
360
let newBuffer : AnyObject = _swift_bufferAllocate (
359
361
bufferType: _uncheckedBufferClass,
360
362
size: totalSize,
361
- alignmentMask: _My . _alignmentMask)
363
+ alignmentMask: ManagedBufferPointer . _alignmentMask)
362
364
363
365
self . _nativeBuffer = Builtin . unsafeCastToNativeObject ( newBuffer)
364
366
}
@@ -372,9 +374,6 @@ public struct ManagedBufferPointer<Header, Element> : Equatable {
372
374
_nativeBuffer = Builtin . unsafeCastToNativeObject ( buffer)
373
375
}
374
376
375
- @usableFromInline // FIXME(sil-serialize-all)
376
- internal typealias _My = ManagedBufferPointer
377
-
378
377
@inlinable // FIXME(sil-serialize-all)
379
378
internal static func _checkValidBufferClass(
380
379
_ bufferClass: AnyClass , creating: Bool = false
@@ -446,7 +445,7 @@ public struct ManagedBufferPointer<Header, Element> : Equatable {
446
445
@inlinable // FIXME(sil-serialize-all)
447
446
internal var _headerPointer : UnsafeMutablePointer < Header > {
448
447
_onFastPath ( )
449
- return ( _address + _My . _headerOffset) . assumingMemoryBound (
448
+ return ( _address + ManagedBufferPointer . _headerOffset) . assumingMemoryBound (
450
449
to: Header . self)
451
450
}
452
451
@@ -456,7 +455,7 @@ public struct ManagedBufferPointer<Header, Element> : Equatable {
456
455
@inlinable // FIXME(sil-serialize-all)
457
456
internal var _elementPointer : UnsafeMutablePointer < Element > {
458
457
_onFastPath ( )
459
- return ( _address + _My . _elementOffset) . assumingMemoryBound (
458
+ return ( _address + ManagedBufferPointer . _elementOffset) . assumingMemoryBound (
460
459
to: Element . self)
461
460
}
462
461
0 commit comments