Program Listing for File annotations.h

Return to documentation for file (api/include/pntos/annotations.h)

#ifndef __has_feature
#   define __has_feature(x) 0
#endif

#if __has_feature(nullability) && defined(_Pragma) && !defined(PNTOS_DISABLE_NULLABILITY)

#   define PNTOS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
#   define PNTOS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
#   define PNTOS_NULLABLE _Nullable

#   pragma clang diagnostic ignored "-Wnullability-extension"

#   pragma clang diagnostic ignored "-Wnullability-completeness"

#else

#   define PNTOS_ASSUME_NONNULL_BEGIN
#   define PNTOS_ASSUME_NONNULL_END
#   define PNTOS_NULLABLE

#endif