From 2a6428c10d39f403870888800438d9dc3b905c9a Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 15 Mar 2013 01:02:30 -0400 Subject: [PATCH] Added an SDL_FORCE_INLINE macro. --- include/begin_code.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/begin_code.h b/include/begin_code.h index cbfc14d8e..61b8250d1 100644 --- a/include/begin_code.h +++ b/include/begin_code.h @@ -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