@@ -420,7 +420,7 @@ extension _StringGuts {
420420#if _runtime(_ObjC)
421421extension _StringGuts {
422422
423- private static var associationKey : UnsafeRawPointer {
423+ private static var _associationKey : UnsafeRawPointer {
424424 struct AssociationKey { }
425425 // We never dereference this, we only use this address as a unique key
426426 return unsafe unsafeBitCast(
@@ -429,7 +429,7 @@ extension _StringGuts {
429429 )
430430 }
431431
432- internal func getAssociatedStorage ( ) -> __StringStorage ? {
432+ private func _getAssociatedStorage ( ) -> __StringStorage ? {
433433 _internalInvariant ( _object. hasObjCBridgeableObject)
434434 let getter = unsafe unsafeBitCast(
435435 getGetAssociatedObjectPtr ( ) ,
@@ -441,7 +441,7 @@ extension _StringGuts {
441441
442442 if let assocPtr = unsafe getter(
443443 _object. objCBridgeableObject,
444- Self . associationKey
444+ Self . _associationKey
445445 ) {
446446 let storage : __StringStorage
447447 storage = unsafe Unmanaged. fromOpaque ( assocPtr) . takeUnretainedValue ( )
@@ -450,7 +450,7 @@ extension _StringGuts {
450450 return nil
451451 }
452452
453- internal func setAssociatedStorage ( _ storage: __StringStorage ) {
453+ private func _setAssociatedStorage ( _ storage: __StringStorage ) {
454454 _internalInvariant ( _object. hasObjCBridgeableObject)
455455 let setter = unsafe unsafeBitCast(
456456 getSetAssociatedObjectPtr ( ) ,
@@ -464,24 +464,24 @@ extension _StringGuts {
464464
465465 unsafe setter(
466466 _object. objCBridgeableObject,
467- Self . associationKey ,
467+ Self . _associationKey ,
468468 storage,
469469 1 //OBJC_ASSOCIATION_RETAIN_NONATOMIC
470470 )
471471 }
472472
473- internal func getOrAllocateAssociatedStorage ( ) -> __StringStorage {
473+ internal func _getOrAllocateAssociatedStorage ( ) -> __StringStorage {
474474 _internalInvariant ( _object. hasObjCBridgeableObject)
475475 let unwrapped : __StringStorage
476476 // libobjc already provides the necessary memory barriers for
477477 // double checked locking to be safe, per comments on
478478 // https://github.com/swiftlang/swift/pull/75148
479- if let storage = getAssociatedStorage ( ) {
479+ if let storage = _getAssociatedStorage ( ) {
480480 unwrapped = storage
481481 } else {
482482 let lock = _object. objCBridgeableObject
483483 objc_sync_enter ( lock)
484- if let storage = getAssociatedStorage ( ) {
484+ if let storage = _getAssociatedStorage ( ) {
485485 unwrapped = storage
486486 } else {
487487 var contents = String . UnicodeScalarView ( )
@@ -494,7 +494,7 @@ extension _StringGuts {
494494 }
495495 _precondition ( contents. _guts. _object. hasNativeStorage)
496496 unwrapped = ( consume contents) . _guts. _object. nativeStorage
497- setAssociatedStorage ( unwrapped)
497+ _setAssociatedStorage ( unwrapped)
498498 }
499499 defer { _fixLifetime ( unwrapped) }
500500 objc_sync_exit ( lock)
0 commit comments