Added an SDL_FORCE_INLINE macro.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 15 Mar 2013 01:02:30 -0400
changeset 7002 978ff4e06388
parent 7001 ccc0d3207639
child 7003 eeaf77005c30
Added an SDL_FORCE_INLINE macro.
include/begin_code.h
--- a/include/begin_code.h	Wed Mar 13 21:41:43 2013 -0700
+++ b/include/begin_code.h	Fri Mar 15 01:02:30 2013 -0400
@@ -128,6 +128,14 @@
 #define __inline__
 #endif
 
+#if defined(_MSC_VER)
+#define SDL_FORCE_INLINE __forceinline
+#elif defined(__GNUC__) || defined(__clang__)
+#define SDL_FORCE_INLINE __attribute__((always_inline)) static inline
+#else
+#define SDL_FORCE_INLINE static __inline__
+#endif
+
 /* Apparently this is needed by several Windows compilers */
 #if !defined(__MACH__)
 #ifndef NULL