File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 261
261
*
262
262
* On compilers without restrict support, this is defined to nothing.
263
263
*
264
- * \since This macro is available since SDL 3.2 .0.
264
+ * \since This macro is available since SDL 3.4 .0.
265
265
*/
266
- #define SDL_RESTRICT __restrict__
266
+ #define SDL_RESTRICT __restrict
267
267
268
268
/* *
269
269
* Check if the compiler supports a given builtin functionality.
325
325
/* end of wiki documentation section. */
326
326
#endif
327
327
328
+ /* `restrict` is from C99, but __restrict works with both Visual Studio and GCC. */
329
+ #ifndef SDL_RESTRICT
330
+ # if defined(restrict) || ((defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901)))
331
+ # defined SDL_RESTRICT restrict
332
+ # elif defined(_MSC_VER) || defined(__GNUC__) || defined(__clang__)
333
+ # define SDL_RESTRICT __restrict
334
+ # else
335
+ # define SDL_RESTRICT
336
+ # endif
337
+ #endif
338
+
328
339
#ifndef SDL_HAS_BUILTIN
329
340
#ifdef __has_builtin
330
341
#define SDL_HAS_BUILTIN (x ) __has_builtin(x)
You can’t perform that action at this time.
0 commit comments