Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sources/Foundation/AttributedString/Conversion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ internal func _loadDefaultAttributes() -> [String : Any.Type] {

@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
fileprivate func _loadScopeAttributes(forSymbol symbol: String, from path: String) -> [String : Any.Type]? {
#if os(macOS)
_loadedScopeCacheLock.lock()
defer { _loadedScopeCacheLock.unlock() }
if let cachedResult = _loadedScopeCache[symbol] {
Expand All @@ -302,6 +303,9 @@ fileprivate func _loadScopeAttributes(forSymbol symbol: String, from path: Strin
let attributeTypes = _loadAttributeTypes(from: scopeType)
_loadedScopeCache[symbol] = attributeTypes
return attributeTypes
#else
return nil
#endif // os(macOS)
}

@available(macOS 12, iOS 15, tvOS 15, watchOS 8, *)
Expand Down