We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GIT_DEPRECATED
1 parent c8ee527 commit 396e496Copy full SHA for 396e496
include/git2/common.h
@@ -48,6 +48,17 @@ typedef size_t size_t;
48
# define GIT_EXTERN(type) extern type
49
#endif
50
51
+/** Declare a function as deprecated. */
52
+#if defined(__GNUC__)
53
+# define GIT_DEPRECATED(func) \
54
+ __attribute__((deprecated)) \
55
+ func
56
+#elif defined(_MSC_VER)
57
+# define GIT_DEPRECATED(func) __declspec(deprecated) func
58
+#else
59
+# define GIT_DEPRECATED(func) func
60
+#endif
61
+
62
/** Declare a function's takes printf style arguments. */
63
#ifdef __GNUC__
64
# define GIT_FORMAT_PRINTF(a,b) __attribute__((format (printf, a, b)))
0 commit comments