We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93ac3ec commit 5f78809Copy full SHA for 5f78809
stdlib/public/core/StringGuts.swift
@@ -421,9 +421,11 @@ extension _StringGuts {
421
extension _StringGuts {
422
423
private static var associationKey: UnsafeRawPointer {
424
- // We never dereference this, we just use this address as a unique key
425
- // TODO: perhaps use the address of a metatype instead
426
- unsafe UnsafeRawPointer(Builtin.addressof(&_swiftEmptyArrayStorage))
+ // We never dereference this, we only use this address as a unique key
+ unsafe unsafeBitCast(
+ ObjectIdentifier(_StringGuts.self),
427
+ to: UnsafeRawPointer.self
428
+ )
429
}
430
431
internal func getAssociatedStorage() -> __StringStorage? {
0 commit comments