Skip to content

Commit 5e870ff

Browse files
committed
Work around compiler crash
1 parent 9d8d27d commit 5e870ff

File tree

2 files changed

+4
-32
lines changed

2 files changed

+4
-32
lines changed

Sources/Testing/ABI/EntryPoints/Library.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@ public struct Library: Sendable {
1919
/// properties.
2020
private nonisolated(unsafe) var _library: SWTLibrary
2121

22-
fileprivate init(_ library: SWTLibrary) {
23-
_library = library
24-
}
25-
2622
/// The human-readable name of this library.
2723
///
2824
/// For example, the value of this property for an instance of this type that

Sources/_TestingInternals/include/Library.h

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,20 @@
1616

1717
SWT_ASSUME_NONNULL_BEGIN
1818

19-
/*
20-
fileprivate typealias EntryPoint = @Sendable @convention(c) (
21-
_ configurationJSON: UnsafeRawPointer,
22-
_ configurationJSONByteCount: Int,
23-
_ reserved: UInt,
24-
_ context: UnsafeRawPointer,
25-
_ recordJSONHandler: EntryPointRecordJSONHandler,
26-
_ completionHandler: EntryPointCompletionHandler
27-
) -> Void
28-
29-
fileprivate typealias EntryPointRecordJSONHandler = @Sendable @convention(c) (
30-
_ recordJSON: UnsafeRawPointer,
31-
_ recordJSONByteCount: Int,
32-
_ reserved: UInt,
33-
_ context: UnsafeRawPointer
34-
) -> Void
35-
36-
fileprivate typealias EntryPointCompletionHandler = @Sendable @convention(c) (
37-
_ exitCode: CInt,
38-
_ reserved: UInt,
39-
_ context: UnsafeRawPointer
40-
) -> Void
41-
*/
42-
43-
typedef void (* SWT_SENDABLE SWTLibraryEntryPointRecordJSONHandler)(
19+
typedef void (* SWTLibraryEntryPointRecordJSONHandler)(
4420
const void *recordJSON,
4521
size_t recordJSONByteCount,
4622
uintptr_t reserved,
4723
const void *_Null_unspecified context
4824
);
4925

50-
typedef void (* SWT_SENDABLE SWTLibraryEntryPointCompletionHandler)(
26+
typedef void (* SWTLibraryEntryPointCompletionHandler)(
5127
int exitCode,
5228
uintptr_t reserved,
5329
const void *_Null_unspecified context
5430
);
5531

56-
typedef void (* SWT_SENDABLE SWTLibraryEntryPoint)(
32+
typedef void (* SWTLibraryEntryPoint)(
5733
const void *configurationJSON,
5834
size_t configurationJSONByteCount,
5935
uintptr_t reserved,
@@ -65,7 +41,7 @@ typedef void (* SWT_SENDABLE SWTLibraryEntryPoint)(
6541
/// A C type that provides the in-memory layout of the ``Library`` Swift type.
6642
typedef struct SWTLibrary {
6743
const char *name;
68-
SWTLibraryEntryPoint SWT_SENDABLE entryPoint;
44+
SWTLibraryEntryPoint entryPoint;
6945
uintptr_t reserved[6];
7046
} SWTLibrary;
7147

0 commit comments

Comments
 (0)