Skip to content

Commit 631821c

Browse files
authored
Merge pull request #376 from dplanitzer/msvc_definitions_for_dispatch_base_h
Added MSVC definitions for the DISPATCH_* macros in dispatch/base.h
2 parents 6bf3065 + 7e523f0 commit 631821c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

dispatch/base.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,29 @@
6565
#define DISPATCH_ALWAYS_INLINE __attribute__((__always_inline__))
6666
#define DISPATCH_UNAVAILABLE __attribute__((__unavailable__))
6767
#define DISPATCH_UNAVAILABLE_MSG(msg) __attribute__((__unavailable__(msg)))
68+
#elif defined(_MSC_VER)
69+
#define DISPATCH_NORETURN __declspec(noreturn)
70+
#define DISPATCH_NOTHROW __declspec(nothrow)
71+
#define DISPATCH_NONNULL1
72+
#define DISPATCH_NONNULL2
73+
#define DISPATCH_NONNULL3
74+
#define DISPATCH_NONNULL4
75+
#define DISPATCH_NONNULL5
76+
#define DISPATCH_NONNULL6
77+
#define DISPATCH_NONNULL7
78+
#define DISPATCH_NONNULL_ALL
79+
#define DISPATCH_SENTINEL
80+
#define DISPATCH_PURE
81+
#define DISPATCH_CONST
82+
#if (_MSC_VER >= 1700)
83+
#define DISPATCH_WARN_RESULT _Check_return_
84+
#else
85+
#define DISPATCH_WARN_RESULT
86+
#endif
87+
#define DISPATCH_MALLOC
88+
#define DISPATCH_ALWAYS_INLINE __forceinline
89+
#define DISPATCH_UNAVAILABLE
90+
#define DISPATCH_UNAVAILABLE_MSG(msg)
6891
#else
6992
/*! @parseOnly */
7093
#define DISPATCH_NORETURN

0 commit comments

Comments
 (0)