]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Pregenerate 2.0 for const folder since it's used often
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index bc65ec05f505e210d23ca6de1329d1cd38ddfab1..bf506fff895812040a49a4fe7abe2e2df0300e36 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
 
 #define GMQCC_VERSION_MAJOR 0
 #define GMQCC_VERSION_MINOR 3
-#define GMQCC_VERSION_PATCH 5
+#define GMQCC_VERSION_PATCH 6
 #define GMQCC_VERSION_BUILD(J,N,P) (((J)<<16)|((N)<<8)|(P))
 #define GMQCC_VERSION \
     GMQCC_VERSION_BUILD(GMQCC_VERSION_MAJOR, GMQCC_VERSION_MINOR, GMQCC_VERSION_PATCH)
 /* Undefine the following on a release-tag: */
-/* #define GMQCC_VERSION_TYPE_DEVEL */
+#define GMQCC_VERSION_TYPE_DEVEL
 
 /* Full version string in case we need it */
 #ifdef GMQCC_VERSION_TYPE_DEVEL
@@ -150,7 +150,7 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
 #    define GMQCC_NORETURN
 #endif /*! (defined(__GNUC__) && __GNUC__ >= 2) || defined (__CLANG__) */
 
-#if (defined(__GNUC__)) || defined(__CLANG__)
+#if defined(__GNUC__) || defined(__CLANG__)
 #   define GMQCC_LIKELY(X)   __builtin_expect((X), 1)
 #   define GMQCC_UNLIKELY(X) __builtin_expect((X), 0)
 #else
@@ -158,6 +158,14 @@ GMQCC_IND_STRING(GMQCC_VERSION_PATCH) \
 #   define GMQCC_UNLIKELY(X) (X)
 #endif
 
+#if defined(__GNUC__) || defined(__CLANG__)
+#   define GMQCC_RESTRICT __restrict__
+#elif defined(__MSC_VER)
+#   define GMQCC_RESTRICT __restrict
+#else
+#   define GMQCC_RESTRICT
+#endif
+
 #define GMQCC_ARRAY_COUNT(X) (sizeof(X) / sizeof((X)[0]))
 
 #ifndef _MSC_VER