File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,37 @@ extern "C" {
167167# define NS_ASSUME_NONNULL_END
168168#endif
169169
170+ #if !__has_feature(nullability)
171+ # ifndef _Nullable
172+ # define _Nullable
173+ # endif
174+ # ifndef _Nonnull
175+ # define _Nonnull
176+ # endif
177+ # ifndef _Null_unspecified
178+ # define _Null_unspecified
179+ # endif
180+ #endif
181+
182+ /*
183+ * Any argument that is passed inside a block is not going to escape
184+ * the runtime of the function itself.
185+ */
186+ #if __has_attribute(noescape)
187+ # define NS_NOESCAPE __attribute__ ((noescape))
188+ #else
189+ # define NS_NOESCAPE
190+ #endif
191+
192+ /*
193+ * Prevent NSError from being imported by Swift as a method that throws.
194+ */
195+ #if __has_attribute(swift_error)
196+ # define NS_SWIFT_NOTHROW __attribute__ ((swift_error(none)))
197+ #else
198+ # define NS_SWIFT_NOTHROW
199+ #endif
200+
170201/*
171202 * Backwards compatibility macro for instance type.
172203 */
You can’t perform that action at this time.
0 commit comments