stdinc: make SDL_stack_free evaluate to ((void)(data)) when alloca is usable.

Fixes #15727.
This commit is contained in:
Ryan C. Gordon 2026-05-30 22:45:33 -04:00
parent 189877b1d3
commit 67e6f5b7ee
No known key found for this signature in database
GPG key ID: FA148B892AB48044

View file

@ -1318,7 +1318,7 @@ extern "C" {
#define SDL_stack_free(data)
#elif !defined(SDL_DISABLE_ALLOCA)
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
#define SDL_stack_free(data)
#define SDL_stack_free(data) ((void)(data))
#else
#define SDL_stack_alloc(type, count) (type*)SDL_malloc(sizeof(type)*(count))
#define SDL_stack_free(data) SDL_free(data)