logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_DEPRECATED - A macro to tag a symbol as deprecated.

Availability

       This macro is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.20                                  SDL_DEPRECATED(3)

Description

       A function is marked deprecated by adding this macro to its declaration:

              extern SDL_DEPRECATED int ThisFunctionWasABadIdea(void);

       Compilers with deprecation support can give a warning when a deprecated function is used. This symbol may
       be used in SDL's headers, but apps are welcome to use it for their own interfaces as well.

       SDL,  on  occasion,  might  deprecate  a function for various reasons. However, SDL never removes symbols
       before major versions, so deprecated interfaces in SDL3 will remain available until SDL4, where it  would
       be expected an app would have to take steps to migrate anyhow.

       On compilers without a deprecation mechanism, this is defined to nothing, and using a deprecated function
       will not generate a warning.

Name

       SDL_DEPRECATED - A macro to tag a symbol as deprecated.

Synopsis

#include<SDL3/SDL_begin_code.h>#defineSDL_DEPRECATED__attribute__((deprecated))

See Also