mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-05 22:30:29 +00:00
docs: Update documentation for SDL_stack_free.
Reference Issue #15727.
(cherry picked from commit 098a066f20)
This commit is contained in:
parent
f5ed7160bf
commit
543072cd50
1 changed files with 4 additions and 3 deletions
|
|
@ -1290,8 +1290,9 @@ extern "C" {
|
|||
/**
|
||||
* Free memory previously allocated with SDL_stack_alloc.
|
||||
*
|
||||
* If SDL used alloca() to allocate this memory, this macro does nothing and
|
||||
* the allocated memory will be automatically released when the function that
|
||||
* If SDL used alloca() to allocate this memory, this macro does nothing (other
|
||||
* than insert `((void)(data)` so the compiler sees an expression) and the
|
||||
* allocated memory will be automatically released when the function that
|
||||
* called SDL_stack_alloc() returns. If SDL used SDL_malloc(), it will
|
||||
* SDL_free the memory immediately.
|
||||
*
|
||||
|
|
@ -1303,7 +1304,7 @@ extern "C" {
|
|||
*
|
||||
* \sa SDL_stack_alloc
|
||||
*/
|
||||
#define SDL_stack_free(data)
|
||||
#define SDL_stack_free(data) ((void)(data))
|
||||
#elif !defined(SDL_DISABLE_ALLOCA)
|
||||
#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
|
||||
#define SDL_stack_free(data) ((void)(data))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue