SDL_begin_code.h: Actually define SDL_RESTRICT.
We wrote documentation for this but never actually filled in the code.
This commit is contained in:
@@ -261,9 +261,9 @@
|
|||||||
*
|
*
|
||||||
* On compilers without restrict support, this is defined to nothing.
|
* On compilers without restrict support, this is defined to nothing.
|
||||||
*
|
*
|
||||||
* \since This macro is available since SDL 3.2.0.
|
* \since This macro is available since SDL 3.4.0.
|
||||||
*/
|
*/
|
||||||
#define SDL_RESTRICT __restrict__
|
#define SDL_RESTRICT __restrict
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if the compiler supports a given builtin functionality.
|
* Check if the compiler supports a given builtin functionality.
|
||||||
@@ -325,6 +325,17 @@
|
|||||||
/* end of wiki documentation section. */
|
/* end of wiki documentation section. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* `restrict` is from C99, but __restrict works with both Visual Studio and GCC. */
|
||||||
|
#ifndef SDL_RESTRICT
|
||||||
|
# if defined(restrict) || ((defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901)))
|
||||||
|
# defined SDL_RESTRICT restrict
|
||||||
|
# elif defined(_MSC_VER) || defined(__GNUC__) || defined(__clang__)
|
||||||
|
# define SDL_RESTRICT __restrict
|
||||||
|
# else
|
||||||
|
# define SDL_RESTRICT
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SDL_HAS_BUILTIN
|
#ifndef SDL_HAS_BUILTIN
|
||||||
#ifdef __has_builtin
|
#ifdef __has_builtin
|
||||||
#define SDL_HAS_BUILTIN(x) __has_builtin(x)
|
#define SDL_HAS_BUILTIN(x) __has_builtin(x)
|
||||||
|
|||||||
Reference in New Issue
Block a user