Skip to content
Merged
Show file tree
Hide file tree
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: 2 additions & 2 deletions Sources/Testing/SourceAttribution/Backtrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ extension Backtrace {
/// - errorAddress: The address of the error existential box.
init(_ errorAddress: UnsafeMutableRawPointer) {
_rawValue = errorAddress
#if SWT_TARGET_OS_APPLE
#if _runtime(_ObjC)
let error = Unmanaged<AnyObject>.fromOpaque(errorAddress).takeUnretainedValue() as! any Error
if type(of: error) is AnyObject.Type {
_rawValue = Unmanaged.passUnretained(error as AnyObject).toOpaque()
Expand Down Expand Up @@ -336,7 +336,7 @@ extension Backtrace {
/// - Note: The underlying Foundation function is called (if present) the
/// first time the value of this property is read.
static let isFoundationCaptureEnabled = {
#if SWT_TARGET_OS_APPLE && !SWT_NO_DYNAMIC_LINKING
#if _runtime(_ObjC) && !SWT_NO_DYNAMIC_LINKING
if Environment.flag(named: "SWT_FOUNDATION_ERROR_BACKTRACING_ENABLED") == true {
let _CFErrorSetCallStackCaptureEnabled = symbol(named: "_CFErrorSetCallStackCaptureEnabled").map {
unsafeBitCast($0, to: (@convention(c) (DarwinBoolean) -> DarwinBoolean).self)
Expand Down
4 changes: 2 additions & 2 deletions Sources/_TestingInternals/include/WillThrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ typedef void (* SWT_SENDABLE SWTWillThrowTypedHandler)(void *error, const void *
/// ``SWTWillThrowTypedHandler``
SWT_EXTERN SWTWillThrowTypedHandler SWT_SENDABLE _Nullable swt_setWillThrowTypedHandler(SWTWillThrowTypedHandler SWT_SENDABLE _Nullable handler);

#if !defined(__APPLE__)
/// The result of `swift__getErrorValue()`.
#if defined(__swift__) && !defined(__OBJC__)
/// The result of `swift_getErrorValue()`.
///
/// For more information, see this type's declaration
/// [in the Swift repository](https://github.com/swiftlang/swift/blob/main/include/swift/Runtime/Error.h).
Expand Down