SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_FunctionPointer

A generic function pointer.

Header File

Defined in <SDL3/SDL_stdinc.h>

Syntax

typedef void (*SDL_FunctionPointer)(void);

Remarks

In theory, generic function pointers should use this, instead of void *, since some platforms could treat code addresses differently than data addresses. Although in current times no popular platforms make this distinction, it is more correct and portable to use the correct type for a generic pointer.

If for some reason you need to force this typedef to be an actual void *, perhaps to work around a compiler or existing code, you can define SDL_FUNCTION_POINTER_IS_VOID_POINTER before including any SDL headers.

Version

This datatype is available since SDL 3.1.3.


CategoryAPI, CategoryAPIDatatype, CategoryStdinc


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.