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