SDL_getenv() should return const

This also allows us to use SDL_FreeLater() and make SDL_getenv() thread-safe on Windows.
This commit is contained in:
Sam Lantinga
2024-07-22 12:09:03 -07:00
parent ef21e31a9a
commit 29f0fd33dc
14 changed files with 88 additions and 95 deletions

View File

@@ -662,7 +662,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_aligned_free(void *mem);
*/
extern SDL_DECLSPEC int SDLCALL SDL_GetNumAllocations(void);
extern SDL_DECLSPEC char * SDLCALL SDL_getenv(const char *name);
extern SDL_DECLSPEC const char * SDLCALL SDL_getenv(const char *name);
extern SDL_DECLSPEC int SDLCALL SDL_setenv(const char *name, const char *value, int overwrite);
typedef int (SDLCALL *SDL_CompareCallback)(const void *a, const void *b);