SDL: Remove SDL_RESTRICT in favor of doc comments

From d6caf2abe78108292daf566ae4539e585bd675dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carl=20=C3=85stholm?= <[EMAIL REDACTED]>
Date: Mon, 9 Sep 2024 18:34:29 +0200
Subject: [PATCH] Remove SDL_RESTRICT in favor of doc comments

---
 include/SDL3/SDL_begin_code.h | 10 ----------
 include/SDL3/SDL_stdinc.h     |  2 +-
 src/dynapi/gendynapi.py       |  1 -
 3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/include/SDL3/SDL_begin_code.h b/include/SDL3/SDL_begin_code.h
index f58baab38d503..acf99284c20da 100644
--- a/include/SDL3/SDL_begin_code.h
+++ b/include/SDL3/SDL_begin_code.h
@@ -225,13 +225,3 @@
 #define SDL_ALLOC_SIZE2(p1, p2)
 #endif
 #endif /* SDL_ALLOC_SIZE2 not defined */
-
-#ifndef SDL_RESTRICT
-#if defined(__GNUC__)
-#define SDL_RESTRICT __restrict__
-#elif defined(_MSC_VER)
-#define SDL_RESTRICT __restrict
-#else
-#define SDL_RESTRICT
-#endif
-#endif
diff --git a/include/SDL3/SDL_stdinc.h b/include/SDL3/SDL_stdinc.h
index 2423bf2d05f41..5cc2b672c3342 100644
--- a/include/SDL3/SDL_stdinc.h
+++ b/include/SDL3/SDL_stdinc.h
@@ -1756,7 +1756,7 @@ extern SDL_DECLSPEC int SDLCALL SDL_strncasecmp(const char *str1, const char *st
  *
  * \since This function is available since SDL 3.0.0.
  */
-extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char * SDL_RESTRICT str, const char * SDL_RESTRICT breakset);
+extern SDL_DECLSPEC char * SDLCALL SDL_strpbrk(const char *str, const char *breakset);
 
 /**
  * The Unicode REPLACEMENT CHARACTER codepoint.
diff --git a/src/dynapi/gendynapi.py b/src/dynapi/gendynapi.py
index e96026cdda480..7c5f430f180ae 100755
--- a/src/dynapi/gendynapi.py
+++ b/src/dynapi/gendynapi.py
@@ -180,7 +180,6 @@ def main():
             func = re.sub(r" SDL_RELEASE\(.*\)", "", func);
             func = re.sub(r" SDL_RELEASE_SHARED\(.*\)", "", func);
             func = re.sub(r" SDL_RELEASE_GENERIC\(.*\)", "", func);
-            func = func.replace(" SDL_RESTRICT", "");
 
             # Should be a valid function here
             match = reg_parsing_function.match(func)