|
10 | 10 | //--- test.swift
|
11 | 11 | import Instance
|
12 | 12 |
|
13 |
| -func foo(_ p: inout MutableSpan<CInt>, a: A, aa: inout A, s: IntSpan, cs: ConstIntSpan, asp: AliasingSpan) { |
| 13 | +func foo(_ p: inout MutableSpan<CInt>, a: A, aa: inout A, s: IntSpan, cs: ConstIntSpan, asp: AliasingSpan, b: inout baz.B) { |
14 | 14 | aa.basic(&p)
|
15 | 15 | aa.bar(&p)
|
16 | 16 | a.constSelf(&p)
|
17 | 17 | a.valSelf(&p)
|
18 | 18 | aa.refSelf(&p)
|
| 19 | + aa.namespaced(&p) |
| 20 | + b.decapseman(&p) |
19 | 21 |
|
20 | 22 | let _: IntSpan = unsafe s.spanSelf()
|
21 | 23 | let _: MutableSpan<CInt> = unsafe s.spanSelf()
|
@@ -57,6 +59,13 @@ const IntSpan spanConstSelf(const IntSpan p __lifetimebound) __attribute__((swif
|
57 | 59 |
|
58 | 60 | ConstIntSpan constSpanSelf(ConstIntSpan p __lifetimebound) __attribute__((swift_name("ConstIntSpan.constSpanSelf(self:)")));
|
59 | 61 |
|
| 62 | +namespace baz { |
| 63 | + void namespaced(A *a, IntSpan p __noescape) __attribute__((swift_name("A.namespaced(self:_:)"))); |
| 64 | + struct B {}; |
| 65 | +} |
| 66 | + |
| 67 | +void decapseman(baz::B *b, IntSpan p __noescape) __attribute__((swift_name("baz.B.decapseman(self:_:)"))); |
| 68 | + |
60 | 69 | //--- Inputs/module.modulemap
|
61 | 70 | module Instance {
|
62 | 71 | header "instance.h"
|
@@ -164,6 +173,46 @@ public func refSelf(_ a: inout A, _ p: inout MutableSpan<CInt>) {
|
164 | 173 | }
|
165 | 174 | }
|
166 | 175 | ------------------------------
|
| 176 | +@__swiftmacro_So1AV10namespaced15_SwiftifyImportfMp_.swift |
| 177 | +------------------------------ |
| 178 | +/// This is an auto-generated wrapper for safer interop |
| 179 | +@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload |
| 180 | +public mutating func namespaced(_ p: inout MutableSpan<CInt>) { |
| 181 | + return unsafe p.withUnsafeMutableBufferPointer { _pPtr in |
| 182 | + return unsafe namespaced(IntSpan(_pPtr)) |
| 183 | + } |
| 184 | +} |
| 185 | +------------------------------ |
| 186 | +@__swiftmacro_So3bazO10namespaced15_SwiftifyImportfMp_.swift |
| 187 | +------------------------------ |
| 188 | +/// This is an auto-generated wrapper for safer interop |
| 189 | +@available(swift, obsoleted: 3, renamed: "A.namespaced(self:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload |
| 190 | + public static func namespaced(_ a: UnsafeMutablePointer<A>!, _ p: inout MutableSpan<CInt>) { |
| 191 | + return unsafe p.withUnsafeMutableBufferPointer { _pPtr in |
| 192 | + return unsafe namespaced(a, IntSpan(_pPtr)) |
| 193 | + } |
| 194 | +} |
| 195 | +------------------------------ |
| 196 | +@__swiftmacro_So3bazO1BV8InstanceE10decapseman15_SwiftifyImportfMp_.swift |
| 197 | +------------------------------ |
| 198 | +/// This is an auto-generated wrapper for safer interop |
| 199 | +@_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload |
| 200 | +public mutating func decapseman(_ p: inout MutableSpan<CInt>) { |
| 201 | + return unsafe p.withUnsafeMutableBufferPointer { _pPtr in |
| 202 | + return unsafe decapseman(IntSpan(_pPtr)) |
| 203 | + } |
| 204 | +} |
| 205 | +------------------------------ |
| 206 | +@__swiftmacro_So10decapseman15_SwiftifyImportfMp_.swift |
| 207 | +------------------------------ |
| 208 | +/// This is an auto-generated wrapper for safer interop |
| 209 | +@available(swift, obsoleted: 3, renamed: "baz.B.decapseman(self:_:)") @_alwaysEmitIntoClient @available(visionOS 1.0, tvOS 12.2, watchOS 5.2, iOS 12.2, macOS 10.14.4, *) @_lifetime(p: copy p) @_disfavoredOverload |
| 210 | +public func decapseman(_ b: UnsafeMutablePointer<baz.B>!, _ p: inout MutableSpan<CInt>) { |
| 211 | + return unsafe p.withUnsafeMutableBufferPointer { _pPtr in |
| 212 | + return unsafe decapseman(b, IntSpan(_pPtr)) |
| 213 | + } |
| 214 | +} |
| 215 | +------------------------------ |
167 | 216 | @__swiftmacro_So3stdO3__1O0056spanCInt_CUnsignedLong_18446744073709551615_syGJqopasxheV8InstanceE8spanSelf15_SwiftifyImportfMp_.swift
|
168 | 217 | ------------------------------
|
169 | 218 | /// This is an auto-generated wrapper for safer interop
|
|
0 commit comments