@@ -191,7 +191,10 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
191
191
/// method, you must either initialize the `count` elements at the
192
192
/// result's `.firstElementAddress` or set the result's `.count`
193
193
/// to zero.
194
- public init ( uninitializedCount: Int , minimumCapacity: Int ) {
194
+ internal init (
195
+ _uninitializedCount uninitializedCount: Int ,
196
+ minimumCapacity: Int
197
+ ) {
195
198
let realMinimumCapacity = Swift . max ( uninitializedCount, minimumCapacity)
196
199
if realMinimumCapacity == 0 {
197
200
self = _ContiguousArrayBuffer < Element > ( )
@@ -248,16 +251,16 @@ struct _ContiguousArrayBuffer<Element> : _ArrayBufferProtocol {
248
251
}
249
252
250
253
/// True, if the array is native and does not need a deferred type check.
251
- var arrayPropertyIsNativeTypeChecked : Bool {
254
+ internal var arrayPropertyIsNativeTypeChecked : Bool {
252
255
return true
253
256
}
254
257
255
258
/// A pointer to the first element.
256
- public var firstElementAddress : UnsafeMutablePointer < Element > {
259
+ internal var firstElementAddress : UnsafeMutablePointer < Element > {
257
260
return __bufferPointer. _elementPointer
258
261
}
259
262
260
- public var firstElementAddressIfContiguous : UnsafeMutablePointer < Element > ? {
263
+ internal var firstElementAddressIfContiguous : UnsafeMutablePointer < Element > ? {
261
264
return firstElementAddress
262
265
}
263
266
@@ -508,7 +511,7 @@ public func += <Element, C : Collection>(
508
511
}
509
512
else {
510
513
var newLHS = _ContiguousArrayBuffer < Element > (
511
- uninitializedCount : newCount,
514
+ _uninitializedCount : newCount,
512
515
minimumCapacity: _growArrayCapacity ( lhs. capacity) )
513
516
514
517
newLHS. firstElementAddress. moveInitialize (
@@ -599,7 +602,7 @@ internal func _copyCollectionToContiguousArray<
599
602
}
600
603
601
604
let result = _ContiguousArrayBuffer < C . Iterator . Element > (
602
- uninitializedCount : count,
605
+ _uninitializedCount : count,
603
606
minimumCapacity: 0 )
604
607
605
608
var p = result. firstElementAddress
@@ -632,7 +635,7 @@ internal struct _UnsafePartiallyInitializedContiguousArrayBuffer<Element> {
632
635
result = _ContiguousArrayBuffer ( )
633
636
} else {
634
637
result = _ContiguousArrayBuffer (
635
- uninitializedCount : initialCapacity,
638
+ _uninitializedCount : initialCapacity,
636
639
minimumCapacity: 0 )
637
640
}
638
641
@@ -647,7 +650,7 @@ internal struct _UnsafePartiallyInitializedContiguousArrayBuffer<Element> {
647
650
// Reallocate.
648
651
let newCapacity = max ( _growArrayCapacity ( result. capacity) , 1 )
649
652
var newResult = _ContiguousArrayBuffer < Element > (
650
- uninitializedCount : newCapacity, minimumCapacity: 0 )
653
+ _uninitializedCount : newCapacity, minimumCapacity: 0 )
651
654
p = newResult. firstElementAddress + result. capacity
652
655
remainingCapacity = newResult. capacity - result. capacity
653
656
newResult. firstElementAddress. moveInitialize (
0 commit comments