From ac6b32bb0280f225bd117a0c1db554dc3ee8f3f2 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 1 Nov 2023 21:47:42 -0400 Subject: [PATCH] gendynapi.py: Discard SDLMAIN_DECLSPEC functions. Otherwise SDL_main and SDL_App* functions look like exported symbols instead of functions the app is meant to implement. Reference PR #8247. --- src/dynapi/gendynapi.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dynapi/gendynapi.py b/src/dynapi/gendynapi.py index 5e6a11b8c..b91f2ee7f 100755 --- a/src/dynapi/gendynapi.py +++ b/src/dynapi/gendynapi.py @@ -134,7 +134,13 @@ def main(): # Discard if it doesn't contain 'SDLCALL' if "SDLCALL" not in func: if args.debug: - print(" Discard: " + func) + print(" Discard, doesn't have SDLCALL: " + func) + continue + + # Discard if it contains 'SDLMAIN_DECLSPEC' (these are not SDL symbols). + if "SDLMAIN_DECLSPEC" in func: + if args.debug: + print(" Discard, has SDLMAIN_DECLSPEC: " + func) continue if args.debug: