|
71 | 71 | /// object.doSomething() |
72 | 72 | /// // The Swift compiler will release object here. |
73 | 73 | /// ``` |
74 | | -#define SWIFT_SHARED_REFERENCE(_retain, _release) \ |
| 74 | +#define SWIFT_SHARED_REFERENCE(_retain, _release) \ |
75 | 75 | __attribute__((swift_attr("import_reference"))) \ |
76 | 76 | __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(retain:_retain)))) \ |
77 | 77 | __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(release:_release)))) |
|
98 | 98 | /// let logger = LoggerSingleton.getInstance() |
99 | 99 | /// logger.log(123) |
100 | 100 | /// ``` |
101 | | -#define SWIFT_IMMORTAL_REFERENCE \ |
102 | | - __attribute__((swift_attr("import_reference"))) \ |
103 | | - __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(retain:immortal)))) \ |
104 | | - __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(release:immortal)))) |
| 101 | +#define SWIFT_IMMORTAL_REFERENCE \ |
| 102 | + __attribute__((swift_attr("import_reference"))) \ |
| 103 | + __attribute__((swift_attr("retain:immortal")))) \ |
| 104 | + __attribute__((swift_attr("release:immortal")))) |
105 | 105 |
|
106 | 106 | /// Specifies that a `class` or `struct` is a reference type whose lifetime |
107 | 107 | /// is not managed automatically. The programmer must validate that any reference |
108 | 108 | /// to such object is valid themselves. This annotation lets Swift import such a type as a reference type in Swift. |
109 | | -#define SWIFT_UNSAFE_REFERENCE \ |
110 | | - __attribute__((swift_attr("import_reference"))) \ |
111 | | - __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(retain:immortal)))) \ |
112 | | - __attribute__((swift_attr(_CXX_INTEROP_STRINGIFY(release:immortal)))) \ |
| 109 | +#define SWIFT_UNSAFE_REFERENCE \ |
| 110 | + __attribute__((swift_attr("import_reference"))) \ |
| 111 | + __attribute__((swift_attr("retain:immortal")))) \ |
| 112 | + __attribute__((swift_attr("release:immortal")))) \ |
113 | 113 | __attribute__((swift_attr("unsafe"))) |
114 | 114 |
|
115 | 115 | /// Specifies a name that will be used in Swift for this declaration instead of its original name. |
|
0 commit comments