Skip to content

Commit 99b49f6

Browse files
committed
Fix SwiftPM build issue for release configuration
error: function type mismatch, declared as '@convention(c) (Optional<UnsafeMutableRawPointer>) -> ()' but used as '@convention(thin) (@owned Optional<AnyObject>) -> ()
1 parent 15ce5b0 commit 99b49f6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Sources/OpenSwiftUICore/View/Animation/Transaction/Transaction.swift

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,9 +229,14 @@ public func withTransaction<R, V>(
229229
return try withTransaction(transaction, body)
230230
}
231231

232+
@_transparent
232233
private var threadTransactionData: AnyObject? {
233-
@_silgen_name("_threadTransactionData")
234-
get
235-
@_silgen_name("_setThreadTransactionData")
236-
set
234+
get {
235+
_threadTransactionData() as AnyObject?
236+
}
237+
set {
238+
_setThreadTransactionData(
239+
newValue.map { Unmanaged.passUnretained($0).toOpaque() }
240+
)
241+
}
237242
}

0 commit comments

Comments
 (0)