|
51 | 51 | /// automatic reference counting.
|
52 | 52 | ///
|
53 | 53 | /// This example shows how to use this macro to let Swift know that
|
54 |
| -/// a non-copyable reference counted C++ class can be imported as a reference counted type in Swift: |
| 54 | +/// a reference counted C++ class can be imported as a reference counted type in Swift: |
55 | 55 | /// ```c++
|
56 |
| -/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject) SWIFT_NONCOPYABLE |
| 56 | +/// class SWIFT_SHARED_REFERENCE(retainSharedObject, releaseSharedObject) |
57 | 57 | /// SharedObject : IntrusiveReferenceCounted<SharedObject> {
|
58 | 58 | /// public:
|
59 | 59 | /// static SharedObject* create();
|
|
82 | 82 | /// type in Swift.
|
83 | 83 | ////
|
84 | 84 | /// This example shows how to use this macro to let Swift know that
|
85 |
| -/// a non-copyable singleton C++ class can be imported as a reference type in Swift: |
| 85 | +/// a singleton C++ class can be imported as a reference type in Swift: |
86 | 86 | /// ```c++
|
87 |
| -/// class SWIFT_IMMORTAL_REFERENCE SWIFT_NONCOPYABLE |
88 |
| -/// LoggerSingleton { |
| 87 | +/// class SWIFT_IMMORTAL_REFERENCE LoggerSingleton { |
89 | 88 | /// public:
|
90 | 89 | /// static LoggerSingleton &getInstance();
|
91 | 90 | /// void log(int x);
|
|
100 | 99 | /// ```
|
101 | 100 | #define SWIFT_IMMORTAL_REFERENCE \
|
102 | 101 | __attribute__((swift_attr("import_reference"))) \
|
103 |
| - __attribute__((swift_attr("retain:immortal")))) \ |
104 |
| - __attribute__((swift_attr("release:immortal")))) |
| 102 | + __attribute__((swift_attr("retain:immortal"))) \ |
| 103 | + __attribute__((swift_attr("release:immortal"))) |
105 | 104 |
|
106 | 105 | /// Specifies that a `class` or `struct` is a reference type whose lifetime
|
107 | 106 | /// is not managed automatically. The programmer must validate that any reference
|
108 | 107 | /// to such object is valid themselves. This annotation lets Swift import such a type as a reference type in Swift.
|
109 | 108 | #define SWIFT_UNSAFE_REFERENCE \
|
110 | 109 | __attribute__((swift_attr("import_reference"))) \
|
111 |
| - __attribute__((swift_attr("retain:immortal")))) \ |
112 |
| - __attribute__((swift_attr("release:immortal")))) \ |
| 110 | + __attribute__((swift_attr("retain:immortal"))) \ |
| 111 | + __attribute__((swift_attr("release:immortal"))) \ |
113 | 112 | __attribute__((swift_attr("unsafe")))
|
114 | 113 |
|
115 | 114 | /// Specifies a name that will be used in Swift for this declaration instead of its original name.
|
|
0 commit comments