mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-26 16:41:36 +00:00
Functions which return function pointers now return SDL_FunctionPointer instead of void*
This fixes the clang warning "Cast between pointer-to-function and pointer-to-object is an extension" You can define SDL_FUNCTION_POINTER_IS_VOID_POINTER in your project to restore the previous behavior. Fixes https://github.com/libsdl-org/SDL/issues/2866
This commit is contained in:
@@ -50,7 +50,7 @@ static int aaudio_LoadFunctions(AAUDIO_Data *data)
|
||||
{
|
||||
#define SDL_PROC(ret, func, params) \
|
||||
do { \
|
||||
data->func = SDL_LoadFunction(data->handle, #func); \
|
||||
data->func = (ret (*) params)SDL_LoadFunction(data->handle, #func); \
|
||||
if (!data->func) { \
|
||||
return SDL_SetError("Couldn't load AAUDIO function %s: %s", #func, SDL_GetError()); \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user