properties: add formal SDL_CleanupPropertyCallback type, improve docs.

This commit is contained in:
Ryan C. Gordon 2024-05-26 12:17:34 -04:00
parent 4ee28b6bb4
commit 2626304e70
No known key found for this signature in database
GPG key ID: FA148B892AB48044
3 changed files with 50 additions and 4 deletions

View file

@ -38,7 +38,7 @@ typedef struct
char *string_storage;
void (SDLCALL *cleanup)(void *userdata, void *value);
SDL_CleanupPropertyCallback cleanup;
void *userdata;
} SDL_Property;
@ -338,7 +338,7 @@ static int SDL_PrivateSetProperty(SDL_PropertiesID props, const char *name, SDL_
return result;
}
int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, void (SDLCALL *cleanup)(void *userdata, void *value), void *userdata)
int SDL_SetPropertyWithCleanup(SDL_PropertiesID props, const char *name, void *value, SDL_CleanupPropertyCallback cleanup, void *userdata)
{
SDL_Property *property;