ANSCompatibility.h 664 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // ANSCompatibility.h
  3. // AnswersKit
  4. //
  5. // Copyright (c) 2015 Crashlytics, Inc. All rights reserved.
  6. //
  7. #pragma once
  8. #if !__has_feature(nullability)
  9. #define nonnull
  10. #define nullable
  11. #define _Nullable
  12. #define _Nonnull
  13. #endif
  14. #ifndef NS_ASSUME_NONNULL_BEGIN
  15. #define NS_ASSUME_NONNULL_BEGIN
  16. #endif
  17. #ifndef NS_ASSUME_NONNULL_END
  18. #define NS_ASSUME_NONNULL_END
  19. #endif
  20. #if __has_feature(objc_generics)
  21. #define ANS_GENERIC_NSARRAY(type) NSArray<type>
  22. #define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary<key_type, object_key>
  23. #else
  24. #define ANS_GENERIC_NSARRAY(type) NSArray
  25. #define ANS_GENERIC_NSDICTIONARY(key_type,object_key) NSDictionary
  26. #endif