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:
parent
7275b2b352
commit
e9b86eebf3
43 changed files with 272 additions and 356 deletions
|
@ -242,7 +242,7 @@ static int GL_LoadFunctions(GL_RenderData *data)
|
|||
int retval = 0;
|
||||
#define SDL_PROC(ret, func, params) \
|
||||
do { \
|
||||
data->func = SDL_GL_GetProcAddress(#func); \
|
||||
data->func = (ret (APIENTRY *) params)SDL_GL_GetProcAddress(#func); \
|
||||
if (!data->func) { \
|
||||
retval = SDL_SetError("Couldn't load GL function %s: %s", #func, SDL_GetError()); \
|
||||
} \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue