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 committed 2024-07-22 13:00:39 -07:00
1 parent ef21e31a9a
commit 29f0fd33dc
14 files changed
+88 -95

No files matched your search

+1 -1
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);