Fix check_stdlib_usage.py libc call matching

It now matches libc usage inside statements,
and skips libc-like usage in strings or as struct members.
This commit is contained in:
Anonymous Maarten
2025-11-24 23:49:02 +01:00
committed by Anonymous Maarten
parent 9896dc18e7
commit e221905195
8 changed files with 42 additions and 33 deletions

View File

@@ -515,7 +515,7 @@ static void SDL_InitDynamicAPILocked(void)
const DWORD rc = GetEnvironmentVariableA(SDL_DYNAMIC_API_ENVVAR, envbuf, (DWORD) sizeof (envbuf));
char *libname = ((rc != 0) && (rc < sizeof (envbuf))) ? envbuf : NULL;
#else
char *libname = getenv(SDL_DYNAMIC_API_ENVVAR);
char *libname = getenv(SDL_DYNAMIC_API_ENVVAR); // This should NOT be SDL_getenv()
#endif
SDL_DYNAPI_ENTRYFN entry = NULL; // funcs from here by default.